Rename arguments of ERC's '/whois' and simplify doc string

* lisp/erc/erc.el (erc-cmd-WHOIS): Rename arguments and reword the doc
string to further clarify and simplify.
This commit is contained in:
Stefan Kangas 2021-10-01 01:21:08 -04:00 committed by Amin Bandali
parent 205eb7f801
commit 88378acbfc
No known key found for this signature in database
GPG key ID: 8B44A0CDC7B956F2

View file

@ -3298,24 +3298,22 @@ a script after exceeding the flood threshold."
t) t)
(t nil))) (t nil)))
(defun erc-cmd-WHOIS (nick-or-server &optional nick-if-server) (defun erc-cmd-WHOIS (first &optional second)
"Display whois information for the given user. "Display whois information for the given user.
If NICK-IF-SERVER is nil, NICK-OR-SERVER should be the nick of With one argument, FIRST is the nickname of the user to request
the user about whom the whois information is to be requested. whois information for.
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 With two arguments, FIRST is the server, and SECOND is the user
is connected to is useful for getting the time the NICK-IF-SERVER nickname.
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 Specifying the server is useful for getting the time the user has
connected to, since only the server a user is connected to knows been idle for, when the user is connected to a different server
the idle time of that user." on the same IRC network. (Only the server a user is connected to
knows how long the user has been idle for.)"
(let ((send (if nick-if-server (let ((send (if nick-if-server
(format "WHOIS %s %s" nick-or-server nick-if-server) (format "WHOIS %s %s" first second)
(format "WHOIS %s" nick-or-server)))) (format "WHOIS %s" first))))
(erc-log (format "cmd: %s" send)) (erc-log (format "cmd: %s" send))
(erc-server-send send) (erc-server-send send)
t)) t))