diff options
| author | Amin Bandali | 2021-09-29 23:11:49 -0400 |
|---|---|---|
| committer | Amin Bandali | 2021-09-29 23:11:49 -0400 |
| commit | dc94ca7b2b878c9a88be72fea118bf6557259ffd (patch) | |
| tree | c0c23d7cedaf56de82d713c97873ff047e3faefd | |
| parent | 9fc1fdcbf330b0a85cd019bb75afcb8d36243524 (diff) | |
| download | emacs-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/NEWS | 9 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 12 |
2 files changed, 21 insertions, 0 deletions
| @@ -2881,6 +2881,15 @@ The new '/opme' convenience command asks ChanServ to set the operator | |||
| 2881 | status for the current nick in the current channel, and '/deopme' | 2881 | status for the current nick in the current channel, and '/deopme' |
| 2882 | unsets it. | 2882 | unsets it. |
| 2883 | 2883 | ||
| 2884 | --- | ||
| 2885 | *** Add '/wii' convenience command for whois with idle time. | ||
| 2886 | The new '/wii' convenience command calls the '/whois' command with the | ||
| 2887 | given nick as both arguments, which is useful for displaying the whois | ||
| 2888 | information for the nick along with idle time, even if the nick is on | ||
| 2889 | a different server than the one the current user is connected to. | ||
| 2890 | Using the given nick itself instead of the server it is connected to | ||
| 2891 | is 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 | |||
| 3327 | This is a convenience function which calls `erc-cmd-WHOIS' with | ||
| 3328 | the given NICK for both arguments. Using NICK in place of the | ||
| 3329 | server argument -- effectively delegating to the IRC network the | ||
| 3330 | looking up of the server to which NICK is connected -- is not | ||
| 3331 | standardized, but is widely supported across IRC networks. | ||
| 3332 | |||
| 3333 | See `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)) |