diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw-erc.el | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/lisp/acdw-erc.el b/lisp/acdw-erc.el index e375c61..801e871 100644 --- a/lisp/acdw-erc.el +++ b/lisp/acdw-erc.el | |||
@@ -80,7 +80,7 @@ If USE-TLS is non-nil, use TLS." | |||
80 | (dolist (buffer (filter-server-buffers)) | 80 | (dolist (buffer (filter-server-buffers)) |
81 | (with-message (format "Reconnecting to server: %s" (buffer-name buffer)) | 81 | (with-message (format "Reconnecting to server: %s" (buffer-name buffer)) |
82 | (with-current-buffer buffer | 82 | (with-current-buffer buffer |
83 | (erc-server-reconnect))))) | 83 | (erc-cmd-RECONNECT))))) |
84 | 84 | ||
85 | (defun erc/disconnect () | 85 | (defun erc/disconnect () |
86 | "Disconnect from all IRC servers." | 86 | "Disconnect from all IRC servers." |
@@ -183,11 +183,9 @@ erc-modified-channels-alist. Should be executed on window change." | |||
183 | "Overlay used to set bar") | 183 | "Overlay used to set bar") |
184 | 184 | ||
185 | (setq erc-bar-overlay (make-overlay 0 0)) | 185 | (setq erc-bar-overlay (make-overlay 0 0)) |
186 | 186 | (overlay-put erc-bar-overlay 'face '(:overline "gray")) | |
187 | 187 | ||
188 | (with-eval-after-load 'erc-track | 188 | (with-eval-after-load 'erc-track |
189 | (overlay-put erc-bar-overlay 'face '(:underline "gray")) | ||
190 | |||
191 | ;;put the hook before erc-modified-channels-update | 189 | ;;put the hook before erc-modified-channels-update |
192 | (defadvice erc-track-mode (after erc-bar-setup-hook | 190 | (defadvice erc-track-mode (after erc-bar-setup-hook |
193 | (&rest args) activate) | 191 | (&rest args) activate) |
@@ -197,5 +195,34 @@ erc-modified-channels-alist. Should be executed on window change." | |||
197 | (erc-bar-update-overlay)))) | 195 | (erc-bar-update-overlay)))) |
198 | 196 | ||
199 | 197 | ||
198 | ;;; ZNC babeee | ||
199 | ;; needed variables are stored in private.el | ||
200 | (defun znc/connect (znc-server znc-port znc-nick irc-servers) | ||
201 | (interactive (let ((zserv (or znc/server | ||
202 | (read-string "ZNC Server: "))) | ||
203 | (zport (or znc/port | ||
204 | (read-number "ZNC Port: "))) | ||
205 | (znick (or znc/nick | ||
206 | (read-string "ZNC Nick: "))) | ||
207 | (servers (or znc/irc-servers | ||
208 | (list | ||
209 | (cons | ||
210 | (read-string "IRC Server to connect to: ") | ||
211 | (read-passwd "Password: ")))))) | ||
212 | (list zserv zport znick servers))) | ||
213 | (let ((si 0)) | ||
214 | (dolist (server irc-servers) | ||
215 | (run-at-time si nil | ||
216 | (lambda () | ||
217 | (erc-tls :server znc-server | ||
218 | :port znc-port | ||
219 | :nick znc-nick | ||
220 | :password (format "%s/%s:%s" | ||
221 | znc-nick | ||
222 | (car server) | ||
223 | (cdr server))))) | ||
224 | (setq si (1+ si))))) | ||
225 | |||
226 | |||
200 | (provide 'acdw-erc) | 227 | (provide 'acdw-erc) |
201 | ;;; acdw-erc.el ends here | 228 | ;;; acdw-erc.el ends here |