summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-11-15 16:41:29 +0100
committerGravatar Tom Willemse2015-11-15 16:41:29 +0100
commit03baab2134de879a77bc99e0fee53418d9983d2f (patch)
tree1b0877e71c9dd0dc7c85c1584b467f5b125c9167 /emacs
parent342bb782467f507c110abd6e4676293b7785ce20 (diff)
downloaddotfiles-03baab2134de879a77bc99e0fee53418d9983d2f.tar.gz
dotfiles-03baab2134de879a77bc99e0fee53418d9983d2f.zip
Automatically authenticate with Circe
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init-circe.org14
1 files changed, 13 insertions, 1 deletions
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