Function: erc-ctcp-query-ACTION
erc-ctcp-query-ACTION is a byte-compiled function defined in
erc.el.gz.
Signature
(erc-ctcp-query-ACTION PROC PARSED NICK LOGIN HOST TO MSG)
Documentation
Respond to a CTCP ACTION query.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-ctcp-query-ACTION (proc parsed nick login host to msg)
"Respond to a CTCP ACTION query."
(when (string-match "^ACTION\\s-\\(.*\\)\\s-*$" msg)
(let ((s (match-string 1 msg))
(buf (or (erc-get-buffer to proc)
(erc-get-buffer nick proc)
(process-buffer proc)))
(selfp (erc-current-nick-p nick)))
(if erc--use-language-catalog-for-ctcp-action-p
(progn
(erc--ensure-spkr-prop nick)
(setq nick (propertize nick 'erc--speaker nick))
(erc-display-message parsed (if selfp 'input 'action) buf
'ACTION ?n nick ?u login ?h host ?a s))
(let* ((obj (and (erc--ctcp-response-p parsed) parsed))
(buffer (and obj (erc--ctcp-response-buffer obj)))
(stsmsg (and obj (erc--ctcp-response-statusmsg obj)))
(prefix (and obj (erc--ctcp-response-prefix obj)))
(dispnm (and obj (erc--ctcp-response-dispname obj)))
(erc-current-message-catalog erc--message-speaker-catalog))
(erc-display-message
parsed nil (or buffer buf)
(if selfp
(if stsmsg 'ctcp-action-statusmsg-input 'ctcp-action-input)
(if stsmsg 'ctcp-action-statusmsg 'ctcp-action))
?s (or stsmsg to)
?p (or (and (erc-channel-user-p prefix)
(erc-get-channel-membership-prefix prefix))
"")
?n (erc--speakerize-nick nick dispnm)
?m s))))))