If you just want to retrieve the mode of a channel, you don't have to pass a
mode argument at all, and you'll get a RPL_CHANNELMODEIS in return.
Signed-off-by: Julien Danjou <julien@danjou.info>
---
command.lisp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/command.lisp b/command.lisp
index aac445b..c167561 100644
--- a/command.lisp
+++ b/command.lisp
@@ -9,7 +9,7 @@
(defgeneric nick (connection new-nickname))
(defgeneric user- (connection username mode &optional realname))
(defgeneric oper (connection name password))
-(defgeneric mode (connection nickname mode))
+(defgeneric mode (connection nickname &optional mode))
(defgeneric op (connection channel nickname))
(defgeneric deop (connection channel nickname))
(defgeneric voice (connection channel user))
@@ -103,7 +103,7 @@ registered."
(defmethod oper ((connection connection) (name string) (password string))
(send-irc-message connection :oper name password))
-(defmethod mode ((connection connection) (nickname string) (mode string))
+(defmethod mode ((connection connection) (nickname string) &optional mode)
(send-irc-message connection :mode nickname mode))
;; utility functions not part of the RFCs
--
1.8.1
_______________________________________________
cl-irc-devel site list
cl-irc-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-irc-devel