blob: 99d2e2f8ea24a0c3526abdf01fc06c72e877b7ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
;; Time-stamp: <2021-04-19 09h46 EDT (hobbies)>
(use-package rcirc
:ensure t
:defer
:hook (rcirc-mode . (lambda ()
(rcirc-track-minor-mode 1)
(rcirc-omit-mode 1)
(spell-fu-mode 1)
(visual-line-mode)
(set (make-local-variable 'scroll-conservatively) 8192)))
:config
(use-package rcirc-color
:ensure t
:if (window-system))
(use-package rcirc-styles
:ensure t
:if (window-system))
(require 'auth-source)
(defadvice rcirc (before rcirc-read-from-authinfo activate)
(unless arg
(custom-set-variables
'(epg-gpg-program "/usr/bin/qubes-gpg-client-wrapper"))
(setq rcirc-server-alist (copy-tree rcirc-server-alist-template))
(dolist (server rcirc-server-alist)
(let* ((pl (cdr server))
(host (plist-get pl :host))
(user (plist-get pl :user))
(port (plist-get pl :port))
(pass (plist-get pl :password)))
(when (string-equal "%LOOKUP%" pass)
(plist-put (cdr server) :password
(concat user ":"
(let ((match (car (auth-source-search :host host))))
(if match
(let ((secret (plist-get match :secret)))
(if (functionp secret) (funcall secret) secret))
(error "Password not found for %s" host)))))
(message "Found authorisation information for %s." host))))))
(defadvice rcirc (after rcirc-clean-passwords activate)
(setq rcirc-server-alist nil)
(custom-set-variables
'(epg-gpg-program "gpg2")))
(setq rcirc-default-full-name "tslil"
rcirc-default-nick "op_4"
rcirc-default-user-name "op_4"
rcirc-default-part-reason "leaving"
rcirc-time-format "%Y-%m-%d %H:%M "
rcirc-log-directory "~/logs/irc/"
rcirc-fill-column 80
rcirc-log-flag t
rcirc-server-alist-template '(("l-3.space"
:host "l-3.space"
:port 6697
:user "tslil"
:password "%LOOKUP%"
:encryption tls))))
|