Function: rcirc-handler-PART-or-KICK

rcirc-handler-PART-or-KICK is a byte-compiled function defined in rcirc.el.gz.

Signature

(rcirc-handler-PART-or-KICK PROCESS RESPONSE CHANNEL SENDER NICK ARGS)

Documentation

Remove NICK from CHANNEL.

PROCESS is the process object for the current connection.

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
;; PART and KICK are handled the same way
(defun rcirc-handler-PART-or-KICK (process _response channel _sender nick _args)
  "Remove NICK from CHANNEL.
PROCESS is the process object for the current connection."
  (rcirc-ignore-update-automatic nick)
  (if (not (string= nick (rcirc-nick process)))
      ;; this is someone else leaving
      (progn
        (rcirc-maybe-remember-nick-quit process nick channel)
        (rcirc-remove-nick-channel process nick channel))
    ;; this is us leaving
    (mapc (lambda (n)
            (rcirc-remove-nick-channel process n channel))
          (rcirc-channel-nicks process channel))

    ;; if the buffer is still around, make it inactive
    (let ((buffer (rcirc-get-buffer process channel)))
      (when buffer
        (rcirc-disconnect-buffer buffer)))))