about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-08-28 00:25:59 -0500
committerCase Duckworth2021-08-28 00:26:15 -0500
commit497fe962a0a369cb3638b3aa2f3d50f566def46d (patch)
tree781a8b535d3684a0ee6dd9a1f6e60e06c664ee78 /lisp
parentSort acdw-modeline.el (diff)
downloademacs-497fe962a0a369cb3638b3aa2f3d50f566def46d.tar.gz
emacs-497fe962a0a369cb3638b3aa2f3d50f566def46d.zip
Add ZNC stuff...
*NOTE*: private.el has also been updated!!!
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-erc.el35
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