Function: erc-remove-channel-user

erc-remove-channel-user is a byte-compiled function defined in erc.el.gz.

Signature

(erc-remove-channel-user NICK)

Documentation

This function is for internal use only.

Removes the user with nickname NICK from the erc-channel-users list for this channel. If this user is not in the erc-channel-users list of any other buffers, the user is also removed from the server's erc-server-users list.

See also: erc-remove-server-user and erc-remove-user.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-remove-channel-user (nick)
  "This function is for internal use only.

Removes the user with nickname NICK from the `erc-channel-users'
list for this channel.  If this user is not in the
`erc-channel-users' list of any other buffers, the user is also
removed from the server's `erc-server-users' list.

See also: `erc-remove-server-user' and `erc-remove-user'."
  (let ((channel-data (erc-get-channel-user nick)))
    (when channel-data
      (let ((user (car channel-data)))
        (setf (erc-server-user-buffers user)
              (delq (current-buffer)
                    (erc-server-user-buffers user)))
        (remhash (erc-downcase nick) erc-channel-users)
        (if (null (erc-server-user-buffers user))
            (erc-remove-server-user nick))))))