Function: erc-dcc-do-CHAT-command

erc-dcc-do-CHAT-command is a byte-compiled function defined in erc-dcc.el.gz.

Signature

(erc-dcc-do-CHAT-command PROC &optional NICK)

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-dcc.el.gz
(defun erc-dcc-do-CHAT-command (proc &optional nick)
  (when nick
    (let ((elt (erc-dcc-member :nick nick :type 'CHAT :parent proc)))
      (if (and elt (not (processp (plist-get elt :peer))))
          ;; accept an existing chat offer
          ;; FIXME: perhaps /dcc accept like other clients?
          (progn (erc-dcc-chat-accept elt erc-server-process)
                 (erc-display-message
                  nil 'notice 'active
                  'dcc-chat-accept ?n nick)
                 t)
        (erc-dcc-chat nick erc-server-process)
        (erc-display-message
         nil 'notice 'active
         'dcc-chat-offer ?n nick)
        t))))