Function: erc-cmd-MODE

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

Signature

(erc-cmd-MODE LINE)

Documentation

Change or display the mode value of a channel or user.

The first word specifies the target. The rest is the mode string to send.

If only one word is given, display the mode of that target.

A list of valid mode strings for Libera.Chat may be found at https://libera.chat/guides/channelmodes and https://libera.chat/guides/usermodes.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
;; FIXME if the user types /MODE<RET>, LINE becomes "\n", which
;; matches the pattern, so "\n" is sent to the server.  Perhaps
;; instead of `do-not-parse-args', this should just join &rest
;; arguments.
(defun erc-cmd-MODE (line)
  "Change or display the mode value of a channel or user.
The first word specifies the target.  The rest is the mode string
to send.

If only one word is given, display the mode of that target.

A list of valid mode strings for Libera.Chat may be found at
`https://libera.chat/guides/channelmodes' and
`https://libera.chat/guides/usermodes'."
  (cond
   ((string-match "^\\s-\\(.*\\)$" line)
    (let ((s (match-string 1 line)))
      (erc-log (format "cmd: MODE: %s" s))
      (erc-server-send (concat "MODE " s)))
    t)
   (t nil)))