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