Function: erc-ctcp-query-SOUND

erc-ctcp-query-SOUND is a byte-compiled function defined in erc-sound.el.gz.

Signature

(erc-ctcp-query-SOUND PROC NICK LOGIN HOST TO MSG)

Documentation

Display a CTCP SOUND message and play sound if erc-play-sound(var)/erc-play-sound(fun) is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-sound.el.gz
(defun erc-ctcp-query-SOUND (_proc nick login host _to msg)
  "Display a CTCP SOUND message and play sound if `erc-play-sound' is non-nil."
  (when (string-match "^SOUND\\s-+\\(\\S-+\\)\\(\\(\\s-+.*\\)\\|\\(\\s-*\\)\\)$" msg)
    (let ((sound (match-string 1 msg))
	  (comment (match-string 2 msg)))
      (when erc-play-sound (erc-play-sound sound))
      (erc-display-message
       nil 'notice nil
       'CTCP-SOUND ?n nick ?u login ?h host ?s sound ?m comment)))
  nil)