Function: erc-autojoin-remove
erc-autojoin-remove is a byte-compiled function defined in
erc-join.el.gz.
Signature
(erc-autojoin-remove PROC PARSED)
Documentation
Remove the channel being left from erc-autojoin-channels-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-join.el.gz
;; (erc-parse-user "kensanata!~user@dclient217-162-233-228.hispeed.ch")
(defun erc-autojoin-remove (proc parsed)
"Remove the channel being left from `erc-autojoin-channels-alist'."
(let* ((chnl (car (erc-response.command-args parsed)))
(nick (car (erc-parse-user (erc-response.sender parsed))))
(server (with-current-buffer (process-buffer proc)
(erc-autojoin-current-server))))
(when (erc-current-nick-p nick)
(let ((elem (or (assoc (erc-network) erc-autojoin-channels-alist)
(assoc server erc-autojoin-channels-alist))))
(when elem
(setcdr elem (delete chnl (cdr elem)))
(unless (cdr elem)
(setq erc-autojoin-channels-alist
(delete elem erc-autojoin-channels-alist)))))))
;; We must return nil to tell ERC to continue running the other
;; functions.
nil)