From 5ee4fe0d9ff316a45afd4ce4e8e51c4e73c0d548 Mon Sep 17 00:00:00 2001 From: EmacsConf Date: Sun, 6 Nov 2022 05:09:42 -0800 Subject: Add ERC commands OPME DEOPME, and modify OPALL --- emacsconf-erc.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/emacsconf-erc.el b/emacsconf-erc.el index fa2eb47..c49562c 100644 --- a/emacsconf-erc.el +++ b/emacsconf-erc.el @@ -297,9 +297,22 @@ If MESSAGE is not specified, reset the topic to the template." ;;; Other commands -(defun erc-cmd-OPALL () +(defun erc-cmd-OPME () + "Request chanserv to op me." + (erc-message "PRIVMSG" + (format "chanserv op %s %s" + (erc-default-target) + (erc-current-nick)) nil)) + +(defun erc-cmd-DEOPME () + "Deop myself from current channel." + (erc-cmd-DEOP (format "%s" (erc-current-nick)))) + +(defun erc-cmd-OPALL (&optional nick) (emacsconf-erc-with-channels (mapcar 'car emacsconf-topic-templates) - (erc-cmd-OPME))) + (if nick + (erc-cmd-OP nick) + (erc-cmd-OPME)))) (defun erc-cmd-BROADCAST (&rest message) "Say MESSAGE in all the emacsconference channels." -- cgit v1.2.3