Function: erc-cmd-MOTD

erc-cmd-MOTD is a byte-compiled function defined in erc.el.gz.

Signature

(erc-cmd-MOTD &optional TARGET)

Documentation

Ask server to send the current MOTD.

Some IRCds simply ignore TARGET.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-cmd-MOTD (&optional target)
  "Ask server to send the current MOTD.
Some IRCds simply ignore TARGET."
  (letrec ((oneoff (lambda (proc parsed)
                     (with-current-buffer (erc-server-buffer)
                       (cl-assert (eq (current-buffer) (process-buffer proc)))
                       (remove-hook 'erc-server-402-functions h402 t)
                       (remove-hook 'erc-server-376-functions h376 t)
                       (remove-hook 'erc-server-422-functions h422 t))
                     (erc-server-MOTD proc parsed)
                     t))
           (h402 (erc-once-with-server-event 402 oneoff))
           (h376 (erc-once-with-server-event 376 oneoff))
           (h422 (erc-once-with-server-event 422 oneoff)))
    (erc-server-send (concat "MOTD" (and target " ") target))))