+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)))
+
+(defun erc-nickserv-identify-autodetect (proc parsed)
+ "Identify to NickServ when an identify request is received.
+Make sure it is the real NickServ for this network.