;; Time-stamp: <2021-04-11 20h03 EDT (hobbies)> (use-package rcirc :ensure t :defer :hook (rcirc-mode . (lambda () (rcirc-track-minor-mode) (spell-fu-mode 1) (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 (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)))))) (setq rcirc-default-full-name "tslil" rcirc-default-nick "tslil" rcirc-default-user-name "hiato" rcirc-time-format "%Y-%m-%d %H:%M " rcirc-log-directory "~/logs/irc/" rcirc-fill-column 80 rcirc-log-flag t rcirc-server-alist '(("ZNC instance" :host "znc.address.tld" :port 6697 :user "user" :password "%LOOKUP%" :encryption tls))))