Add Twitch configuration to Circe

This commit is contained in:
Tom Willemse 2016-03-14 12:28:21 +01:00
parent 4d8b3559bb
commit ea5263a852

View file

@ -150,21 +150,29 @@ wanted it. So now I use Circe.
something happens there, though usually not. something happens there, though usually not.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun oni:circe-nickserv-password (_) (defun oni:circe-nickserv-password-getter (host)
(lambda (_)
(let ((found (nth 0 (auth-source-search :max 1 (let ((found (nth 0 (auth-source-search :max 1
:host "irc.freenode.net" :host host
:require '(:secret))))) :require '(:secret)))))
(when found (when found
(let ((secret (plist-get found :secret))) (let ((secret (plist-get found :secret)))
(if (functionp secret) (if (functionp secret)
(funcall secret) (funcall secret)
secret))))) secret))))))
(setq circe-network-options (setq circe-network-options
`(("Freenode" `(("Freenode"
:nick "ryuslash" :nick "ryuslash"
:channels ("#emacs" "#mowedline" "#ninthfloor") :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 #+END_SRC
* Show #mowedline in a frame without minibuffer * Show #mowedline in a frame without minibuffer