[cl-irc-devel] [PATCH 1/6] Make mode optional in `mode' command

Erik Huelsmann ehuels at gmail.com
Sun Jan 13 18:50:47 UTC 2013


Committed as r238. Thanks!

Bye,

Erik.


On Sun, Jan 13, 2013 at 3:04 PM, Julien Danjou <julien at danjou.info> wrote:

> 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 at 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 at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cl-irc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-irc-devel/attachments/20130113/3a641011/attachment.html>


More information about the cl-irc-devel mailing list