emacs-diffs
[Top][All Lists]
Advanced

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

master 081eb52: Switch the order of ERC's '/whois' arguments sent to the


From: Amin Bandali
Subject: master 081eb52: Switch the order of ERC's '/whois' arguments sent to the server
Date: Wed, 29 Sep 2021 01:03:59 -0400 (EDT)

branch: master
commit 081eb52e4d8441a82134db5b34848474a1d01acf
Author: Amin Bandali <bandali@gnu.org>
Commit: Amin Bandali <bandali@gnu.org>

    Switch the order of ERC's '/whois' arguments sent to the server
    
    * lisp/erc/erc.el (erc-cmd-WHOIS): Switch the order of 'server' and
    'user' arguments sent to the server.  Per RFC 1459 and RFC 2812, the
    optional 'server' argument command comes before the 'user' argument,
    not after.  While at it, update the doc string to explain why one may
    want to specify the 'server' argument.
    * etc/NEWS: Announce the change.
---
 etc/NEWS        | 5 +++++
 lisp/erc/erc.el | 9 ++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 6d039ba..bf942cb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2853,6 +2853,11 @@ The new '/opme' convenience command asks ChanServ to set 
the operator
 status for the current nick in the current channel, and '/deopme'
 unsets it.
 
+---
+*** Fix the order of '/whois' arguments sent to the server.
+Per RFC 1459 and RFC 2812, when given, the optional 'server' argument
+for the WHOIS command must come before the 'user' argument, not after.
+
 ** xwidget-webkit mode
 
 ---
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index ac0c08b..7fa2d37 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3301,10 +3301,13 @@ a script after exceeding the flood threshold."
 (defun erc-cmd-WHOIS (user &optional server)
   "Display whois information for USER.
 
-If SERVER is non-nil, use that, rather than the current server."
-  ;; FIXME: is the above docstring correct?  -- Lawrence 2004-01-08
+If SERVER is non-nil, use that, rather than the current server.
+This is useful for getting the time USER has been idle for, if
+USER is on a different server of the network than the current
+user, since only the server the user is connected to knows this
+information."
   (let ((send (if server
-                  (format "WHOIS %s %s" user server)
+                  (format "WHOIS %s %s" server user)
                 (format "WHOIS %s" user))))
     (erc-log (format "cmd: %s" send))
     (erc-server-send send)



reply via email to

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