aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali2021-09-29 23:11:49 -0400
committerAmin Bandali2021-09-29 23:11:49 -0400
commitdc94ca7b2b878c9a88be72fea118bf6557259ffd (patch)
treec0c23d7cedaf56de82d713c97873ff047e3faefd
parent9fc1fdcbf330b0a85cd019bb75afcb8d36243524 (diff)
downloademacs-dc94ca7b2b878c9a88be72fea118bf6557259ffd.tar.gz
emacs-dc94ca7b2b878c9a88be72fea118bf6557259ffd.zip
Add new '/wii' convenience ERC command
* etc/NEWS: Announce the addition of the command. * lisp/erc/erc.el (erc-cmd-WII): Add '/wii' convenience command which calls the '/whois' command with the given nick as both arguments, which is useful for displaying the whois information for the nick along with idle time, even if the nick is on a different server than the one we are currently connected to.
-rw-r--r--etc/NEWS9
-rw-r--r--lisp/erc/erc.el12
2 files changed, 21 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d57f67ea400..c75ec35ff1f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2881,6 +2881,15 @@ The new '/opme' convenience command asks ChanServ to set the operator
2881status for the current nick in the current channel, and '/deopme' 2881status for the current nick in the current channel, and '/deopme'
2882unsets it. 2882unsets it.
2883 2883
2884---
2885*** Add '/wii' convenience command for whois with idle time.
2886The new '/wii' convenience command calls the '/whois' command with the
2887given nick as both arguments, which is useful for displaying the whois
2888information for the nick along with idle time, even if the nick is on
2889a different server than the one the current user is connected to.
2890Using the given nick itself instead of the server it is connected to
2891is not standardized, but is widely supported across IRC networks.
2892
2884** xwidget-webkit mode 2893** xwidget-webkit mode
2885 2894
2886--- 2895---
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index ccb1f63bc39..2427332189a 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3321,6 +3321,18 @@ the idle time of that user."
3321 t)) 3321 t))
3322(defalias 'erc-cmd-WI #'erc-cmd-WHOIS) 3322(defalias 'erc-cmd-WI #'erc-cmd-WHOIS)
3323 3323
3324(defun erc-cmd-WII (nick)
3325 "Display whois information for NICK, including idle time.
3326
3327This is a convenience function which calls `erc-cmd-WHOIS' with
3328the given NICK for both arguments. Using NICK in place of the
3329server argument -- effectively delegating to the IRC network the
3330looking up of the server to which NICK is connected -- is not
3331standardized, but is widely supported across IRC networks.
3332
3333See `erc-cmd-WHOIS' for more details."
3334 (erc-cmd-WHOIS nick nick))
3335
3324(defun erc-cmd-WHOAMI () 3336(defun erc-cmd-WHOAMI ()
3325 "Display whois information about yourself." 3337 "Display whois information about yourself."
3326 (erc-cmd-WHOIS (erc-current-nick)) 3338 (erc-cmd-WHOIS (erc-current-nick))