Function: erc-nickserv-identification-autodetect
erc-nickserv-identification-autodetect is a byte-compiled function
defined in erc-services.el.gz.
Signature
(erc-nickserv-identification-autodetect PROC PARSED)
Documentation
Check for NickServ's successful identification notice.
Make sure it is the real NickServ for this network and that it has
specifically confirmed a successful identification attempt.
If this is the case, run erc-nickserv-identified-hook.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-services.el.gz
(defun erc-nickserv-identification-autodetect (_proc parsed)
"Check for NickServ's successful identification notice.
Make sure it is the real NickServ for this network and that it has
specifically confirmed a successful identification attempt.
If this is the case, run `erc-nickserv-identified-hook'."
(let* ((network (erc-network))
(sender (erc-nickserv-alist-sender network))
(success-regex (erc-nickserv-alist-identified-regexp network))
(sspec (erc-response.sender parsed))
(nick (car (erc-response.command-args parsed)))
(msg (erc-response.contents parsed)))
;; continue only if we're sure it's the real nickserv for this network
;; and it's told us we've successfully identified
(when (and sender (equal sspec sender)
success-regex
(string-match success-regex msg))
(erc-log "NickServ IDENTIFY success notification detected")
(run-hook-with-args 'erc-nickserv-identified-hook network nick)
nil)))