From ea5263a85210316005184602405643097c215c81 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 14 Mar 2016 12:28:21 +0100 Subject: [PATCH] Add Twitch configuration to Circe --- emacs/.emacs.d/init-circe.org | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/emacs/.emacs.d/init-circe.org b/emacs/.emacs.d/init-circe.org index 81d3612..97867e3 100644 --- a/emacs/.emacs.d/init-circe.org +++ b/emacs/.emacs.d/init-circe.org @@ -150,21 +150,29 @@ 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))))) + (defun oni:circe-nickserv-password-getter (host) + (lambda (_) + (let ((found (nth 0 (auth-source-search :max 1 + :host host + :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") - :nickserv-password oni:circe-nickserv-password))) + :nickserv-password ,(oni:circe-nickserv-password-getter "irc.freenode.net")) + ("Twitch" + :use-tls nil + :nick "ryuslash" + :host "irc.twitch.tv" + :pass ,(oni:circe-nickserv-password-getter "irc.twitch.tv") + :port 6667 + :channels ("#escondida")))) #+END_SRC * Show #mowedline in a frame without minibuffer