summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-irc.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/acdw-irc.el b/lisp/acdw-irc.el index 193275c..0891f31 100644 --- a/lisp/acdw-irc.el +++ b/lisp/acdw-irc.el
@@ -79,6 +79,29 @@ and right on t."
79 (if alignment "" (repeat-string left-over " ")) 79 (if alignment "" (repeat-string left-over " "))
80 after))) 80 after)))
81 81
82(defun irc ()
83 "Connect to all IRC networks in `circe-network-options'."
84 (interactive)
85 (dolist (network (mapcar #'car circe-network-options))
86 (circe-maybe-connect network)))
87
88(defun circe-network-connected-p (network)
89 "Return non-nil if there's any Circe server-buffer whose
90`circe-server-netwok' is NETWORK."
91 (catch 'return
92 (dolist (buffer (circe-server-buffers))
93 (with-current-buffer buffer
94 (if (string= network circe-server-network)
95 (throw 'return t))))))
96
97(defun circe-maybe-connect (network)
98 "Connect to NETWORK, but ask user for confirmation if it's
99already been connected to."
100 (interactive "sNetwork: ")
101 (if (or (not (circe-network-connected-p network))
102 (y-or-n-p (format "Already connected to %s, reconnect?" network)))
103 (circe network)))
104
82 105
83(provide 'acdw-irc) 106(provide 'acdw-irc)
84;;; acdw-irc.el ends here 107;;; acdw-irc.el ends here