Change to acdw/make-password-fetcher
This commit is contained in:
parent
b184b3bd89
commit
c4eb3a9841
13
init.el
13
init.el
|
@ -1229,17 +1229,22 @@ like a dumbass."
|
|||
`(("Libera Chat"
|
||||
:channels ("#emacs" "#systemcrafters" "##webpals")
|
||||
:sasl-username "acdw"
|
||||
:sasl-password ,(acdw/fetch-password :host "libera.chat"))
|
||||
:sasl-password ,(acdw/make-password-fetcher
|
||||
:host "libera.chat"))
|
||||
("Tilde Chat"
|
||||
:channels ("#meta" "#bread" "#dadjokes" "#team")
|
||||
:host "irc.tilde.chat" :port 6697 :use-tls t
|
||||
:sasl-username "acdw"
|
||||
:sasl-password ,(acdw/fetch-password :host "tilde.chat"))
|
||||
:sasl-password ,(acdw/make-password-fetcher
|
||||
:host "tilde.chat"))
|
||||
("Casa"
|
||||
:channels ("#basement")
|
||||
:host "m455.casa" :port 6697 :use-tls t
|
||||
:sasl-username "acdw"
|
||||
:sasl-password ,(acdw/fetch-password :host "m455.casa")))
|
||||
:sasl-password ,(acdw/make-password-fetcher
|
||||
:host "m455.casa"))
|
||||
("Piss"
|
||||
:host "piss.hmm.st" :port 6697 :use-tls t))
|
||||
circe-reduce-lurker-spam t
|
||||
circe-server-auto-join-default-type :after-auth)
|
||||
|
||||
|
@ -1358,7 +1363,7 @@ like a dumbass."
|
|||
(:option elfeed-use-curl t
|
||||
elfeed-feeds `(("fever+https://acdw@mf.acdw.net"
|
||||
:api-url "https://mf.acdw.net/fever/"
|
||||
:password ,(acdw/fetch-password
|
||||
:password ,(acdw/make-password-fetcher
|
||||
:host "mf.acdw.net"))))
|
||||
|
||||
(elfeed-protocol-enable)
|
||||
|
|
|
@ -593,6 +593,7 @@ It's called 'require-private' for historical reasons."
|
|||
;;; Auth-sources
|
||||
;; https://github.com/emacs-circe/circe/wiki/Configuration
|
||||
(defun acdw/fetch-password (&rest params)
|
||||
"Fetch a password from `auth-source'."
|
||||
(require 'auth-source)
|
||||
(let ((match (car (apply #'auth-source-search params))))
|
||||
(if match
|
||||
|
@ -602,6 +603,11 @@ It's called 'require-private' for historical reasons."
|
|||
secret))
|
||||
(message "Password not found for %S" params))))
|
||||
|
||||
(defun acdw/make-password-fetcher (&rest params)
|
||||
"Make a function that will fetch a password using `acdw/fetch-password'."
|
||||
(lambda (&rest _)
|
||||
(apply #'acdw/fetch-password params)))
|
||||
|
||||
|
||||
;;; Paren annoyances
|
||||
(defun acdw/stop-paren-annoyances (&optional buffer)
|
||||
|
|
Loading…
Reference in New Issue