1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-18 18:05:07 +00:00

Add new '/opme' and '/deopme' convenience ERC commands

* lisp/erc/erc.el (erc-cmd-OPME, erc-cmd-DEOPME): Add convenience
commands for setting and unsetting the operator status on the current
nick in the current channel.  'erc-cmd-OPME' relies on ChanServ for
obtaining the operator status (see doc string for more details).

* etc/NEWS: Announce the addition of the commands.
This commit is contained in:
Amin Bandali 2021-09-18 23:29:44 -04:00
parent fc8df2561b
commit bc59c98f09
No known key found for this signature in database
GPG Key ID: 8B44A0CDC7B956F2
2 changed files with 23 additions and 0 deletions

View File

@ -2736,6 +2736,11 @@ declared obsolete and rewritten as 'erc-track-select-mode-line-face',
with different expected arguments (the current and old faces are now
separated) and clearer documentation.
*** Add '/opme' and '/deopme' convenience commands.
The new '/opme' convenience command asks ChanServ to set the operator
status for the current nick in the current channel, and '/deopme'
unsets it.
** xwidget-webkit mode
---

View File

@ -3803,6 +3803,24 @@ the message given by REASON."
(mapconcat #'identity people " ")))
t))
(defun erc-cmd-OPME ()
"Ask ChanServ to op the current nick in the current channel.
This command assumes a ChanServ (channel service) available on
the IRC network which accepts an \"op\" command that takes the
channel name and the user's nick, and that the current nick is
allowed to become an operator in the current channel (typically
means that the user has a +o flag in the channel's access list)."
(erc-message "PRIVMSG"
(format "ChanServ op %s %s"
(erc-default-target)
(erc-current-nick))
nil))
(defun erc-cmd-DEOPME ()
"Deop the current nick in the current channel."
(erc-cmd-DEOP (erc-current-nick)))
(defun erc-cmd-TIME (&optional line)
"Request the current time and date from the current server."
(cond