Function: erc--send-message-external

erc--send-message-external is a byte-compiled function defined in erc.el.gz.

Signature

(erc--send-message-external LINE FORCE)

Documentation

Send a "PRIVMSG" to the default target with optional FORCE.

Expect caller to bind erc-default-recipients if needing to specify a status-prefixed target.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--send-message-external (line force)
  "Send a \"PRIVMSG\" to the default target with optional FORCE.
Expect caller to bind `erc-default-recipients' if needing to
specify a status-prefixed target."
  ;; Almost like an echoed message, but without the `erc--cmd'.
  (let* ((erc-current-message-catalog erc--message-speaker-catalog)
         (target (erc-default-target))
         (erc--msg-prop-overrides `((erc--tmp) ,@erc--msg-prop-overrides))
         ;; This util sets the `erc--spkr' property in ^.
         (trimmed (erc--statusmsg-target target))
         (stmsgindc (and trimmed (substring target 0 1)))
         (queryp (and erc--target (not (erc--target-channel-p erc--target))))
         (args (erc--determine-speaker-message-format-args
                (erc-current-nick) line queryp 'privmsgp 'inputp
                stmsgindc 'prefix)))
    (erc-message "PRIVMSG" (concat target " " line) force)
    (push (cons 'erc--msg (car args)) erc--msg-prop-overrides)
    (apply #'erc-display-message nil nil (current-buffer) args))
  ;; FIXME - treat multiline, run hooks, or remove me?
  ;; FIXME explain this ^ in more detail or remove.
  t)