Function: rcirc-cmd-join

rcirc-cmd-join is an interactive and byte-compiled function defined in rcirc.el.gz.

Signature

(rcirc-cmd-join ARGLIST &optional PROCESS TARGET)

Documentation

Join CHANNELS.

CHANNELS is a comma- or space-separated string of channel names.

Note: If PROCESS or TARGET are nil, the values given by rcirc-buffer-process and rcirc-target will be used.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(rcirc-define-command join (channels)
  "Join CHANNELS.
CHANNELS is a comma- or space-separated string of channel names."
  (interactive "sJoin channels: ")
  (let* ((split-channels (split-string channels "[ ,]" t))
         (buffers (mapcar (lambda (ch)
                            (rcirc-get-buffer-create process ch))
                          split-channels))
         (channels (mapconcat 'identity split-channels ",")))
    (rcirc-send-string process "JOIN" channels)
    (when (not (eq (selected-window) (minibuffer-window)))
      (dolist (b buffers) ;; order the new channel buffers in the buffer list
        (switch-to-buffer b)))))