Function: rcirc-authenticate
rcirc-authenticate is an interactive and byte-compiled function
defined in rcirc.el.gz.
Signature
(rcirc-authenticate)
Documentation
Send authentication to process associated with current buffer.
Passwords are stored in rcirc-authinfo (which see).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-authenticate ()
"Send authentication to process associated with current buffer.
Passwords are stored in `rcirc-authinfo' (which see)."
(interactive)
(with-rcirc-server-buffer
(pcase-dolist (`(,(rx (regexp rcirc-server)) . ,ai) rcirc-authinfo)
(pcase ai
(`(nickserv ,(rx (regexp rcirc-nick)) :auth-source . ,(or `(,nickserv) '()))
(if-let* ((auth (auth-source-search
:host rcirc-server
:port (nth 1 rcirc-connection-info)
:user (nth 2 rcirc-connection-info)))
(password (auth-info-password (car auth))))
(rcirc-send-privmsg
(rcirc-buffer-process)
(or nickserv "NickServ")
(concat "IDENTIFY " password))
(rcirc-print
(rcirc-buffer-process) rcirc-nick "ERROR" nil
"No auth-source entry found for `nickserv' authentication")))
(`(nickserv ,(rx (regexp rcirc-nick)) ,password . ,(or `(,nickserv) '()))
(rcirc-send-privmsg
(rcirc-buffer-process)
(or nickserv "NickServ")
(concat "IDENTIFY " password)))
(`(chanserv ,(rx (regexp rcirc-nick)) ,channel ,password)
(rcirc-send-privmsg
(rcirc-buffer-process)
"ChanServ"
(format "IDENTIFY %s %s" channel password)))
(`(bitlbee ,(rx (regexp rcirc-nick)) ,password)
(rcirc-send-privmsg
(rcirc-buffer-process)
"&bitlbee"
(concat "IDENTIFY " password)))
(`(quakenet ,account ,password)
;; quakenet authentication doesn't rely on the user's
;; nickname. the variable `account' here represents the Q
;; account name.
(rcirc-send-privmsg
(rcirc-buffer-process)
"Q@CServe.quakenet.org"
(format "AUTH %s %s" account password)))))))