diff options
author | bd <bdunahu@operationnull.com> | 2025-09-01 22:24:04 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-09-01 22:24:04 -0400 |
commit | 57ac5af334fde8e86f112debfa7225b703fcf0b2 (patch) | |
tree | c94be6416dfa0ffb3ffe9f959587f9f8fb90ded0 /.config | |
parent | ef4e2c70463aefdf8ea4bfd32782cf8b878be677 (diff) |
add rcirc command to jump networks
Diffstat (limited to '.config')
-rw-r--r-- | .config/emacs/modules/bd--irc.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.config/emacs/modules/bd--irc.el b/.config/emacs/modules/bd--irc.el index 99b1a49..c07a4fe 100644 --- a/.config/emacs/modules/bd--irc.el +++ b/.config/emacs/modules/bd--irc.el @@ -5,12 +5,27 @@ (require 'fill-column) (use-package rcirc + :bind (:map rcirc-mode-map + ("C-c j" . #'bd/rcirc-jump-net)) :hook ((rcirc-mode . (lambda () (setq-local fill-column-desired-width 80) (fill-column-mode) (rcirc-omit-mode)))) :config + (setopt bd/rcirc-networks '("libera" "furnet")) + (defun bd/rcirc-jump-net () + "Prompts the user for a irc network in BD/RCIRC-NETWORKS, then issues +ZNC to hop networks." + (interactive) + (let ((buffer (current-buffer))) + (when (and (buffer-local-value 'rcirc-server-buffer buffer) + (eq (process-status (rcirc-buffer-process)) 'open)) + (let ((target (completing-read "Jump to: " bd/rcirc-networks))) + (if (stringp target) + (rcirc-send-string (rcirc-buffer-process) + "PRIVMSG" "*status" : + (concat "JUMPNETWORK " target))))))) (setopt rcirc-fill-column 80 rcirc-omit-threshold 10 rcirc-reconnect-delay 60 |