I'm trying to achieve the automatic authentication of my registered nickname on Freenode, so that I can join the #emacs
IRC channel.
Since I upload my Emacs config to a public repository, I've opted to grab the personal data of my nickname and password from a file on my local machine.
Below is the code I've come up with trying to achieve this. And I don't know why it's not working.
It seems like a trivial task to accomplish, but I'm at a loss; not knowing if it's a problem with the syntax, semantics, and/or the way the package handles my nickname/password.
(defun jd:get-string-from-file (filePath beg end)
(with-temp-buffer
(insert-file-contents filePath nil beg end)
(buffer-string)))
(defvar jd:irc-nickname (jd:get-string-from-file "~/.authinfo" 0 15))
(defvar jd:irc-password (jd:get-string-from-file "~/.authinfo" 16 26))
;;;;;;;;;;;;;;
;;; `rcirc.el'
(setq rcirc-default-nick jd:irc-nickname)
(setq rcirc-authinfo '(("freenode" nickserv jd:irc-nickname jd:irc-password)))
(setq rcirc-server-alist '(("irc.freenode.net" :port 6667 :channels ("#emacs"))))