Commit | Line | Data |
---|---|---|
54896c4f MW |
1 | ;;; -*-emacs-lisp-*- |
2 | ;;; | |
3 | ;;; ERC configuration | |
4 | ||
5 | (load "~/.erc-auth.el") | |
6 | (setq erc-nick "mdw" | |
7 | erc-user-full-name "Mark Wooding") | |
8 | ||
db8b2f3c MW |
9 | (setq erc-fill-column 76 |
10 | erc-timestamp-right-column 68 | |
54896c4f MW |
11 | erc-fill-prefix " ") |
12 | ||
13 | (load "~/.erc-local.el") | |
14 | ||
15 | (setq erc-track-exclude-types '("NICK" "JOIN" "PART")) | |
16 | ||
17 | (setq erc-auto-query 'buffer) | |
18 | ||
c655b794 MW |
19 | (defun mdw-erc-turn-off-truncate-lines () |
20 | (setq truncate-lines nil | |
21 | truncate-partial-with-windows nil | |
22 | word-wrap t | |
d9be013a | 23 | wrap-prefix (concat (propertize " " 'face 'erc-prompt-face) |
c655b794 MW |
24 | " "))) |
25 | (add-hook 'erc-mode-hook 'mdw-erc-turn-off-truncate-lines) | |
26 | ||
54896c4f MW |
27 | (setq erc-autojoin t |
28 | erc-autojoin-domain-only nil | |
29 | erc-autojoin-channels-alist | |
30 | '(("irc.ssdis.loc" "#devel" "#jukebox" "#nextgen") | |
31 | ("cam.irc.devel.ncipher.com" | |
32 | "#devel" "#jukebox" "#nextgen" "#sec-team") | |
14b88992 | 33 | ("chiark.greenend.org.uk" "#chiark"))) |
54896c4f MW |
34 | |
35 | (defvar mdw-erc-auto-greet-bots-alist | |
36 | `(("irc.ssdis.loc" "fastness" | |
37 | ,(format "identpass mwooding %s" mdw-fastness-password)) | |
38 | ("cam.irc.devel.ncipher.com" "fastness" | |
39 | ,(format "identpass mwooding %s" mdw-fastness-password)) | |
14b88992 | 40 | ("chiark.greenend.org.uk" "blight" |
54896c4f MW |
41 | ,(format "identpass mdw %s" mdw-blight-password))) |
42 | "*Alist of (SERVER-REGEXP BOT-NICK MESSAGE-FORM). | |
43 | Evaluate MESSAGE-FORM and sent to BOT-NICK when connected to a server which | |
44 | matches SERVER-REGEXP.") | |
45 | ||
46 | (defun mdw-erc-auto-greet-bots (server nick) | |
47 | "Send greeting message to bots." | |
48 | (dolist (l mdw-erc-auto-greet-bots-alist) | |
49 | (when (string-match (car l) server) | |
50 | (let ((bot (cadr l)) | |
51 | (message (caddr l))) | |
52 | (erc-server-send (concat "PRIVMSG " bot " :" message)))))) | |
53 | (add-hook 'erc-after-connect 'mdw-erc-auto-greet-bots) |