diff options
author | Case Duckworth | 2021-07-14 08:37:47 -0500 |
---|---|---|
committer | Case Duckworth | 2021-07-14 08:37:47 -0500 |
commit | d4449377b49db3b0d1f33ebfd73502297bc949ce (patch) | |
tree | a49d212f8583332cde0febe3a1e872c6d0c38cad | |
parent | Merge branch 'main' of tildegit.org:acdw/emacs (diff) | |
download | emacs-d4449377b49db3b0d1f33ebfd73502297bc949ce.tar.gz emacs-d4449377b49db3b0d1f33ebfd73502297bc949ce.zip |
Add `erc/reconnect'
-rw-r--r-- | lisp/acdw-erc.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/acdw-erc.el b/lisp/acdw-erc.el index f62e731..783dcd8 100644 --- a/lisp/acdw-erc.el +++ b/lisp/acdw-erc.el | |||
@@ -74,6 +74,14 @@ If USE-TLS is non-nil, use TLS." | |||
74 | (and (erc-server-buffer-p x) x)) | 74 | (and (erc-server-buffer-p x) x)) |
75 | (buffer-list)))) | 75 | (buffer-list)))) |
76 | 76 | ||
77 | (defun erc/reconnect () | ||
78 | "Reconnect to all IRC servers." | ||
79 | (interactive) | ||
80 | (dolist (buffer (filter-server-buffers)) | ||
81 | (with-message (format "Reconnecting to server: %s" (buffer-name buffer)) | ||
82 | (with-current-buffer buffer | ||
83 | (erc-server-reconnect))))) | ||
84 | |||
77 | (defun erc/disconnect () | 85 | (defun erc/disconnect () |
78 | "Disconnect from all IRC servers." | 86 | "Disconnect from all IRC servers." |
79 | (interactive) | 87 | (interactive) |
@@ -81,6 +89,7 @@ If USE-TLS is non-nil, use TLS." | |||
81 | (with-message (format "Killing server buffer: %s" (buffer-name buffer)) | 89 | (with-message (format "Killing server buffer: %s" (buffer-name buffer)) |
82 | (with-current-buffer buffer | 90 | (with-current-buffer buffer |
83 | (erc-quit-server erc/bye-message)))) | 91 | (erc-quit-server erc/bye-message)))) |
92 | ;; TODO: kill all channel buffers | ||
84 | (force-mode-line-update)) | 93 | (force-mode-line-update)) |
85 | 94 | ||
86 | (defun acdw-erc/prompt () | 95 | (defun acdw-erc/prompt () |