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.
#+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