Variable: erc-server-PART-functions
erc-server-PART-functions is a variable defined in erc-backend.el.gz.
Value
(erc-server-PART)
Documentation
Hook called upon receiving a PART 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-PART.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(define-erc-response-handler (PART)
"Handle part messages." nil
(let* ((chnl (car (erc-response.command-args parsed)))
(reason (erc-trim-string (erc-response.contents parsed)))
(buffer (erc-get-buffer chnl proc)))
(pcase-let ((`(,nick ,login ,host)
(erc-parse-user (erc-response.sender parsed))))
(erc-remove-channel-member buffer nick)
(erc-display-message parsed 'notice buffer
'PART ?n nick ?u login
?h host ?c chnl ?r (or reason ""))
(when (string= nick (erc-current-nick))
(run-hook-with-args 'erc-part-hook buffer)
(erc-with-buffer
(buffer)
(erc-remove-channel-users))
(with-suppressed-warnings ((obsolete erc-delete-default-channel))
(erc-delete-default-channel chnl buffer))
(erc-update-mode-line buffer)
(when erc-kill-buffer-on-part
(kill-buffer buffer))))))