emacs-diffs
[Top][All Lists]
Advanced

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

master dc94ca7: Add new '/wii' convenience ERC command


From: Amin Bandali
Subject: master dc94ca7: Add new '/wii' convenience ERC command
Date: Wed, 29 Sep 2021 23:14:30 -0400 (EDT)

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

    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.
---
 etc/NEWS        |  9 +++++++++
 lisp/erc/erc.el | 12 ++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index d57f67e..c75ec35 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2881,6 +2881,15 @@ The new '/opme' convenience command asks ChanServ to set 
the operator
 status for the current nick in the current channel, and '/deopme'
 unsets it.
 
+---
+*** Add '/wii' convenience command for whois with idle time.
+The new '/wii' convenience command 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 the current user is connected to.
+Using the given nick itself instead of the server it is connected to
+is not standardized, but is widely supported across IRC networks.
+
 ** xwidget-webkit mode
 
 ---
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index ccb1f63..2427332 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3321,6 +3321,18 @@ the idle time of that user."
     t))
 (defalias 'erc-cmd-WI #'erc-cmd-WHOIS)
 
+(defun erc-cmd-WII (nick)
+  "Display whois information for NICK, including idle time.
+
+This is a convenience function which calls `erc-cmd-WHOIS' with
+the given NICK for both arguments.  Using NICK in place of the
+server argument -- effectively delegating to the IRC network the
+looking up of the server to which NICK is connected -- is not
+standardized, but is widely supported across IRC networks.
+
+See `erc-cmd-WHOIS' for more details."
+  (erc-cmd-WHOIS nick nick))
+
 (defun erc-cmd-WHOAMI ()
   "Display whois information about yourself."
   (erc-cmd-WHOIS (erc-current-nick))



reply via email to

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