summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-09-01 17:14:44 -0500
committerCase Duckworth2021-09-01 17:14:44 -0500
commit9bbc43a4557adcfafe75c3970c16c5102bfdf195 (patch)
treefe275b3930c51cad9e05c476c3cc95d36a289823
parentChange fonts depending on system (diff)
downloademacs-9bbc43a4557adcfafe75c3970c16c5102bfdf195.tar.gz
emacs-9bbc43a4557adcfafe75c3970c16c5102bfdf195.zip
Add acdw/fetch-password and circe network configuration
-rw-r--r--init.el19
-rw-r--r--lisp/acdw.el13
2 files changed, 29 insertions, 3 deletions
diff --git a/init.el b/init.el index 3e631fc..d56c33d 100644 --- a/init.el +++ b/init.el
@@ -1119,9 +1119,24 @@ like a dumbass."
1119 1119
1120 (setq acdw-irc/post-my-nick "-> ") 1120 (setq acdw-irc/post-my-nick "-> ")
1121 1121
1122 (setq circe-default-part-message "See You, Space Cowpokes . . ." 1122 (setq circe-default-nick "acdw"
1123 circe-default-part-message "See You, Space Cowpokes . . ."
1123 circe-highlight-nick-type 'all 1124 circe-highlight-nick-type 'all
1124 ;; circe-network-options in private.el 1125 circe-network-options
1126 (("Libera Chat"
1127 :channels ("#emacs" "#systemcrafters" "##webpals")
1128 :sasl-username "acdw"
1129 :sasl-password ,(acdw/fetch-password :host "libera.chat"))
1130 ("Tilde Chat"
1131 :channels ("#meta" "#bread" "#dadjokes" "#team")
1132 :host "irc.tilde.chat" :port 6697 :use-tls t
1133 :sasl-username "acdw"
1134 :sasl-password ,(acdw/fetch-password :host "tilde.chat"))
1135 ("Casa"
1136 :channels ("#basement")
1137 :host "m455.casa" :port 6697 :use-tls t
1138 :sasl-username "acdw"
1139 :sasl-password ,(acdw/fetch-password :host "m455.casa")))
1125 circe-reduce-lurker-spam t 1140 circe-reduce-lurker-spam t
1126 circe-server-auto-join-default-type :after-auth) 1141 circe-server-auto-join-default-type :after-auth)
1127 1142
diff --git a/lisp/acdw.el b/lisp/acdw.el index f23ca0e..796c2f1 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -579,7 +579,18 @@ It's called 'require-private' for historical reasons."
579 (switch-to-buffer nil) 579 (switch-to-buffer nil)
580 (other-window (or arg 1)))) 580 (other-window (or arg 1))))
581 581
582 582
583;;; Auth-sources
584;; https://github.com/emacs-circe/circe/wiki/Configuration
585(defun acdw/fetch-password (&rest params)
586 (require 'auth-source)
587 (let ((match (car (apply #'auth-source-search params))))
588 (if match
589 (let ((secret (plist-get match :secret)))
590 (if (functionp secret)
591 (funcall secret)
592 secret))
593 (warn "Password not found for %S" params))))
583 594
584(provide 'acdw) 595(provide 'acdw)
585;;; acdw.el ends here 596;;; acdw.el ends here