summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmacsConf <emacsconf-org@gnu.org>2022-11-06 05:09:42 -0800
committerEmacsConf <emacsconf-org@gnu.org>2022-11-06 05:09:42 -0800
commit5ee4fe0d9ff316a45afd4ce4e8e51c4e73c0d548 (patch)
tree924348b3ecee96c70c9c68165c8e4d5d081adb94
parent15d8dd04ce097d3d037ac1b821718feb7837a415 (diff)
downloademacsconf-el-5ee4fe0d9ff316a45afd4ce4e8e51c4e73c0d548.tar.xz
emacsconf-el-5ee4fe0d9ff316a45afd4ce4e8e51c4e73c0d548.zip
Add ERC commands OPME DEOPME, and modify OPALL
Diffstat (limited to '')
-rw-r--r--emacsconf-erc.el17
1 files 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."