[Top][All Lists]

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

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

From: Leo
Subject: bug#9453: 23.3; rcirc: INVITE command handled incorrectly
Date: Wed, 07 Sep 2011 10:27:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.8)

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."

reply via email to

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