Remove erc-scrolltoplace
[~bandali/configs] / lisp / bandali-erc.el
CommitLineData
4c05c418
AB
1;;; bandali-erc.el --- bandali's ERC setup -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2018-2020 Amin Bandali
4
5;; Author: Amin Bandali <bandali@gnu.org>
6;; Keywords: tools
7
8;; This program is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation, either version 3 of the License, or
11;; (at your option) any later version.
12
13;; This program is distributed in the hope that it will be useful,
14;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;; GNU General Public License for more details.
17
18;; You should have received a copy of the GNU General Public License
19;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21;;; Commentary:
22
23;; My ERC setup for IRC. It uses my fork of ZNC.el.
24
25;;; Code:
26
39c1c073 27(use-package erc
5361eed6 28 :bind ("C-c w e" . erc-switch-to-buffer-other-window)
39c1c073 29 :custom
e3e01ce1
AB
30 (erc-autojoin-domain-only nil)
31 (erc-format-nick-function 'erc-format-@nick)
39c1c073
AB
32 (erc-join-buffer 'bury)
33 (erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
34 (erc-nick "bandali")
35 (erc-prompt "erc>")
36 (erc-rename-buffers t)
37 (erc-server-reconnect-attempts 5)
38 (erc-server-reconnect-timeout 3)
39 :config
5361eed6
AB
40 (declare-function erc-message "erc-backend"
41 (message-command line &optional force))
42 (declare-function erc-default-target "erc")
43 (declare-function erc-current-nick "erc")
39c1c073
AB
44 (defun erc-cmd-OPME ()
45 "Request chanserv to op me."
46 (erc-message "PRIVMSG"
47 (format "chanserv op %s %s"
48 (erc-default-target)
49 (erc-current-nick)) nil))
5361eed6 50 (declare-function erc-cmd-DEOP "erc" (&rest people))
39c1c073
AB
51 (defun erc-cmd-DEOPME ()
52 "Deop myself from current channel."
53 (erc-cmd-DEOP (format "%s" (erc-current-nick))))
54 (add-to-list 'erc-modules 'keep-place)
55 (add-to-list 'erc-modules 'notifications)
56 (add-to-list 'erc-modules 'smiley)
57 (add-to-list 'erc-modules 'spelling)
5361eed6 58 (declare-function erc-update-modules "erc")
39c1c073
AB
59 (erc-update-modules))
60
61(use-package erc-fill
62 :after erc
63 :custom
64 (erc-fill-column 77)
65 (erc-fill-function 'erc-fill-static)
66 (erc-fill-static-center 18))
67
e3e01ce1
AB
68(use-package erc-match
69 :after erc
70 :custom
71 (erc-pals
72 '("aindilis" "blackbeard" "bremner" "brettgilio" "civodul" "dto"
73 "ggoes" "jrasata" "jxself" "mplsCorwin" "quiliro" "rindolf" "rwp"
74 "sachac" "technomancy")))
75
39c1c073
AB
76(use-package erc-pcomplete
77 :after erc
78 :custom
79 (erc-pcomplete-nick-postfix ", "))
80
81(use-package erc-track
82 :after erc
83 :bind (("C-c a e t d" . erc-track-disable)
5361eed6
AB
84 ("C-c a e t e" . erc-track-enable)
85 ("C-c a e M-a" . erc-track-switch-buffer-other-window)
86 :map erc-mode-map
87 ("M-a" . erc-track-switch-buffer))
39c1c073
AB
88 :custom
89 (erc-track-enable-keybindings nil)
90 (erc-track-exclude-types '("JOIN" "MODE" "NICK" "PART" "QUIT"
91 "324" "329" "332" "333" "353" "477"))
92 (erc-track-position-in-mode-line t)
93 (erc-track-priority-faces-only 'all)
e3e01ce1
AB
94 (erc-track-shorten-function nil)
95 (erc-track-showcount t))
39c1c073
AB
96
97(use-package erc-hl-nicks
98 :after erc)
99
39c1c073
AB
100(use-package znc
101 :bind (("C-c a e e" . znc-erc)
102 ("C-c a e a" . znc-all))
103 :config
104 (let ((pwd (let ((auth (auth-source-search :host "znca")))
105 (cond
106 ((null auth) (error "Couldn't find znca's authinfo"))
107 (t (funcall (plist-get (car auth) :secret)))))))
108 (setq znc-servers
6b09fc8a
AB
109 `(("znc.emacsconf.org" 6697 t
110 ((freenode "bandali/freenode" ,pwd)))
111 ("znc.emacsconf.org" 6697 t
112 ((oftc "bandali/oftc" ,pwd)))))))
39c1c073
AB
113
114(provide 'bandali-erc)
4c05c418 115;;; bandali-erc.el ends here