From 03baab2134de879a77bc99e0fee53418d9983d2f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 15 Nov 2015 16:41:29 +0100 Subject: Automatically authenticate with Circe --- emacs/.emacs.d/init-circe.org | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/init-circe.org b/emacs/.emacs.d/init-circe.org index 81b9e32..ba0ddb8 100644 --- a/emacs/.emacs.d/init-circe.org +++ b/emacs/.emacs.d/init-circe.org @@ -15,6 +15,7 @@ wanted it. So now I use Circe. libraries that are used in the configuration of Circe. #+BEGIN_SRC emacs-lisp + (require 'auth-source) (require 'lui) (require 'circe) (require 's) @@ -144,10 +145,21 @@ wanted it. So now I use Circe. something happens there, though usually not. #+BEGIN_SRC emacs-lisp + (defun oni:circe-nickserv-password (_) + (let ((found (nth 0 (auth-source-search :max 1 + :host "irc.freenode.net" + :require '(:secret))))) + (when found + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret))))) + (setq circe-network-options `(("Freenode" :nick "ryuslash" - :channels ("#emacs" "#mowedline" "#ninthfloor")))) + :channels ("#emacs" "#mowedline" "#ninthfloor") + :nickserv-password oni:circe-nickserv-password))) #+END_SRC * Change the time-stamp -- cgit v1.2.3-54-g00ecf