about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/init.el b/init.el index 06a2450..2f51ce8 100644 --- a/init.el +++ b/init.el
@@ -1089,6 +1089,29 @@ like a dumbass."
1089 circe-reduce-lurker-spam t 1089 circe-reduce-lurker-spam t
1090 circe-server-auto-join-default-type :after-auth) 1090 circe-server-auto-join-default-type :after-auth)
1091 1091
1092 (defun irc ()
1093 "Connect to IRC."
1094 (interactive)
1095 (dolist (network (mapcar #'car circe-network-options))
1096 (circe-maybe-connect network)))
1097
1098 (defun circe-network-connected-p (network)
1099 "Return non-nil if there's any Circe server-buffer whose
1100`circe-server-netwok' is NETWORK."
1101 (catch 'return
1102 (dolist (buffer (circe-server-buffers))
1103 (with-current-buffer buffer
1104 (if (string= network circe-server-network)
1105 (throw 'return t))))))
1106
1107 (defun circe-maybe-connect (network)
1108 "Connect to NETWORK, but ask user for confirmation if it's
1109already been connected to."
1110 (interactive "sNetwork: ")
1111 (if (or (not (circe-network-connected-p network))
1112 (y-or-n-p (format "Already connected to %s, reconnect?" network)))
1113 (circe network)))
1114
1092 (add-hook 'circe-chat-mode-hook 1115 (add-hook 'circe-chat-mode-hook
1093 (defun circe-chat@setup () 1116 (defun circe-chat@setup ()
1094 (lui-set-prompt 1117 (lui-set-prompt