Function: erc-cmd-JOIN
erc-cmd-JOIN is a byte-compiled function defined in erc.el.gz.
Signature
(erc-cmd-JOIN CHANNEL &optional KEY)
Documentation
Join the channel given in CHANNEL, optionally with KEY.
If CHANNEL is specified as "-invite", join the channel to which you
were most recently invited. See also invitation.
Aliases
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-cmd-JOIN (channel &optional key)
"Join the channel given in CHANNEL, optionally with KEY.
If CHANNEL is specified as \"-invite\", join the channel to which you
were most recently invited. See also `invitation'."
(let (chnl)
(if (string= (upcase channel) "-INVITE")
(if erc-invitation
(setq chnl erc-invitation)
(erc-display-message nil 'error (current-buffer) 'no-invitation))
(setq chnl (erc-ensure-channel-name channel)))
(when chnl
;; Prevent double joining of same channel on same server.
(if-let* ((existing (erc-get-buffer chnl erc-server-process))
((with-current-buffer existing
(erc-get-channel-user (erc-current-nick)))))
(switch-to-buffer existing)
(setq erc--server-last-reconnect-count 0)
(erc-server-join-channel nil chnl key))))
t)