Variable: erc-server-401-functions

erc-server-401-functions is a variable defined in erc-backend.el.gz.

Value

(erc-server-401)

Documentation

Hook called upon receiving a 401 server response.

Each function is called with two arguments, the process associated with the response and the parsed response. If the function returns non-nil, stop processing the hook. Otherwise, continue.

See also erc-server-401.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(define-erc-response-handler (401)
  "No such nick/channel." nil
  (let ((nick/channel (cadr (erc-response.command-args parsed))))
    (defvar erc-whowas-on-nosuchnick)
    (when erc-whowas-on-nosuchnick
      (erc-log (format "cmd: WHOWAS: %s" nick/channel))
      (erc-server-send (format "WHOWAS %s 1" nick/channel)))
    (erc-display-message parsed '(notice error) 'active
                         's401 ?n nick/channel)
    (unless (erc-channel-p nick/channel)
      (erc-remove-user nick/channel))))