Update 2 drones
[~bandali/configs] / lisp / bandali-erc.el
1 (use-package erc
2 :bind ("C-c w e" . erc-switch-to-buffer-other-window)
3 :custom
4 (erc-join-buffer 'bury)
5 (erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
6 (erc-nick "bandali")
7 (erc-prompt "erc>")
8 (erc-rename-buffers t)
9 (erc-server-reconnect-attempts 5)
10 (erc-server-reconnect-timeout 3)
11 :config
12 (declare-function erc-message "erc-backend"
13 (message-command line &optional force))
14 (declare-function erc-default-target "erc")
15 (declare-function erc-current-nick "erc")
16 (defun erc-cmd-OPME ()
17 "Request chanserv to op me."
18 (erc-message "PRIVMSG"
19 (format "chanserv op %s %s"
20 (erc-default-target)
21 (erc-current-nick)) nil))
22 (declare-function erc-cmd-DEOP "erc" (&rest people))
23 (defun erc-cmd-DEOPME ()
24 "Deop myself from current channel."
25 (erc-cmd-DEOP (format "%s" (erc-current-nick))))
26 (add-to-list 'erc-modules 'keep-place)
27 (add-to-list 'erc-modules 'notifications)
28 (add-to-list 'erc-modules 'smiley)
29 (add-to-list 'erc-modules 'spelling)
30 (add-to-list 'erc-modules 'scrolltoplace)
31 (declare-function erc-update-modules "erc")
32 (erc-update-modules))
33
34 (use-package erc-fill
35 :after erc
36 :custom
37 (erc-fill-column 77)
38 (erc-fill-function 'erc-fill-static)
39 (erc-fill-static-center 18))
40
41 (use-package erc-pcomplete
42 :after erc
43 :custom
44 (erc-pcomplete-nick-postfix ", "))
45
46 (use-package erc-track
47 :after erc
48 :bind (("C-c a e t d" . erc-track-disable)
49 ("C-c a e t e" . erc-track-enable)
50 ("C-c a e M-a" . erc-track-switch-buffer-other-window)
51 :map erc-mode-map
52 ("M-a" . erc-track-switch-buffer))
53 :custom
54 (erc-track-enable-keybindings nil)
55 (erc-track-exclude-types '("JOIN" "MODE" "NICK" "PART" "QUIT"
56 "324" "329" "332" "333" "353" "477"))
57 (erc-track-position-in-mode-line t)
58 (erc-track-priority-faces-only 'all)
59 (erc-track-shorten-function nil))
60
61 (use-package erc-hl-nicks
62 :after erc)
63
64 (use-package erc-scrolltoplace
65 :after erc)
66
67 (use-package znc
68 :bind (("C-c a e e" . znc-erc)
69 ("C-c a e a" . znc-all))
70 :config
71 (let ((pwd (let ((auth (auth-source-search :host "znca")))
72 (cond
73 ((null auth) (error "Couldn't find znca's authinfo"))
74 (t (funcall (plist-get (car auth) :secret)))))))
75 (setq znc-servers
76 `(("znc.shemshak.org" 1337 t
77 ((freenode "amin/freenode" ,pwd)))
78 ("znc.shemshak.org" 1337 t
79 ((oftc "amin/oftc" ,pwd)))))))
80
81 (provide 'bandali-erc)