rcircAutoAuthentication

If you want rcirc to auto-authenticate, set the variable ‘rcirc-authinfo’.

‘rcirc-authinfo’ should contain one or more lists containing:

SERVER-REGEXP
a regular expression string to match server(s)
METHOD
a symbol from the set (nickserv chanserv bitlbee)
NICK
the user’s nickname as string
CHANNEL
a channel as string when method is ‘chanserv’, otherwise absent
PASSWORD
the user’s password as string

example:

 (setq rcirc-authinfo '(("freenode" nickserv "bob" "p455w0rd")
                        ("freenode" chanserv "bob" "#bobland" "passwd99")
                        ("bitlbee" bitlbee "robert" "sekrit")))

Note that if you have BitlBee running locally, you need an entry using “localhost” instead of “bitlbee”:

 ((...)
  ("localhost" "kensanata" bitlbee "mu!"))

auto-authentication can be disabled by setting ‘rcirc-auto-authenticate-flag’ to nil.

Following code snippet advices rcirc to read authinfo from ‘auth-sources’ with port set to “nickserv”, “bitlbee”, or “quakenet”. The only missing auth method is chanserv.

(defadvice rcirc (before rcirc-read-from-authinfo activate)
  "Allow rcirc to read authinfo from ~/.authinfo.gpg via the auth-source API.
This doesn't support the chanserv auth method"
  (unless arg
    (dolist (p (auth-source-search :port '("nickserv" "bitlbee" "quakenet")
                                   :require '(:port :user :secret)))
      (let ((secret (plist-get p :secret))
            (method (intern (plist-get p :port))))
        (add-to-list 'rcirc-authinfo
                     (list (plist-get p :host)
                           method
                           (plist-get p :user)
                           (if (functionp secret)
                               (funcall secret)
                             secret)))))))

CategoryChatClient rcirc