summaryrefslogtreecommitdiff
path: root/lisp/erc/erc.el
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2021-09-29 22:15:07 -0400
committerAmin Bandali <bandali@gnu.org>2021-09-29 22:17:18 -0400
commit9fc1fdcbf330b0a85cd019bb75afcb8d36243524 (patch)
tree6b96d903cc4349423a2ddb678b1b5c4c1e90252d /lisp/erc/erc.el
parent758753431af51f7ac79a55d426b915443e66a077 (diff)
downloademacs-9fc1fdcbf330b0a85cd019bb75afcb8d36243524.tar.gz
emacs-9fc1fdcbf330b0a85cd019bb75afcb8d36243524.tar.bz2
emacs-9fc1fdcbf330b0a85cd019bb75afcb8d36243524.zip
Restore the previous order of ERC's '/whois' arguments
* etc/NEWS: Remove unneeded entry. * lisp/erc/erc.el (erc-cmd-WHOIS): Restore the previous order of arguments sent to the server, so that there's no change in the function's behavior. Instead, rename the arguments to be more accurate, and expand upon them in the doc string.
Diffstat (limited to 'lisp/erc/erc.el')
-rw-r--r--lisp/erc/erc.el29
1 files changed, 18 insertions, 11 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 7fa2d37c9f2..ccb1f63bc39 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3298,17 +3298,24 @@ a script after exceeding the flood threshold."
t)
(t nil)))
-(defun erc-cmd-WHOIS (user &optional server)
- "Display whois information for USER.
-
-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" server user)
- (format "WHOIS %s" user))))
+(defun erc-cmd-WHOIS (nick-or-server &optional nick-if-server)
+ "Display whois information for the given user.
+
+If NICK-IF-SERVER is nil, NICK-OR-SERVER should be the nick of
+the user about whom the whois information is to be requested.
+Otherwise, if NICK-IF-SERVER is non-nil, NICK-OR-SERVER should be
+the server to which the user with the nick NICK-IF-USER is
+connected to.
+
+Specifying the server NICK-OR-SERVER that the nick NICK-IF-SERVER
+is connected to is useful for getting the time the NICK-IF-SERVER
+user has been idle for, when the user NICK-IF-SERVER is connected
+to a different server of the network than the one current user is
+connected to, since only the server a user is connected to knows
+the idle time of that user."
+ (let ((send (if nick-if-server
+ (format "WHOIS %s %s" nick-or-server nick-if-server)
+ (format "WHOIS %s" nick-or-server))))
(erc-log (format "cmd: %s" send))
(erc-server-send send)
t))