bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9453: 23.3; rcirc: INVITE command handled incorrectly


From: Peter Feigl
Subject: bug#9453: 23.3; rcirc: INVITE command handled incorrectly
Date: Thu, 08 Sep 2011 16:17:02 +0200
User-agent: Notmuch/0.7-27-g8e2a14b (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu)

On Wed, 07 Sep 2011 10:27:52 +0800, Leo <sdl.web@gmail.com> wrote:
> On 2011-09-07 04:29 +0800, Peter Feigl wrote:
> > According to RFC 2812 the INVITE command has two parameters: the user
> > and the channel. If I connect to any server via M-x rcirc, join a
> > channel and type "/invite user #channel", RCIRC incorrectly
> > sends "INVITE :user #channel". It should instead send "INVITE user
> > #channel" (note the missing colon). This leads to the server rejecting
> > the incorrect invite.
> 
> My reading of the code seems to suggest all commands that take more than
> one params must be defined by defun-rcirc-command otherwise are
> incorrectly handled.
> 
> Could you try the following patch (against emacs-23.3)?
> 
> Changes in HEAD
>  lisp/net/rcirc.el |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
>       Modified lisp/net/rcirc.el
> diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
> index 2baaa951..c0333313 100644
> --- a/lisp/net/rcirc.el
> +++ b/lisp/net/rcirc.el
> @@ -2042,6 +2042,16 @@ (defun-rcirc-command join (channel)
>      (when (not (eq (selected-window) (minibuffer-window)))
>        (switch-to-buffer buffer))))
>  
> +(defun-rcirc-command invite (nick-channel)
> +  "Invite NICK to CHANNEL."
> +  (interactive (list
> +                (concat
> +                 (completing-read "Invite nick: "
> +                                  (with-rcirc-server-buffer 
> rcirc-nick-table))
> +                 " "
> +                 (read-string "Channel: "))))
> +  (rcirc-send-string process (concat "INVITE " nick-channel)))
> +
>  ;; TODO: /part #channel reason, or consider removing #channel altogether
>  (defun-rcirc-command part (channel)
>    "Part CHANNEL."

Thank you, this is the same way I patched it myself yesterday. Could you
get this patch into the official emacs repositories? It works perfectly.

Thanks for the swift help!

Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]