Function: erc-capab-identify-remove/set-identified-flag

erc-capab-identify-remove/set-identified-flag is a byte-compiled function defined in erc-capab.el.gz.

Signature

(erc-capab-identify-remove/set-identified-flag PROC PARSED)

Documentation

Remove PARSED message's id flag and add the erc-identified text property.

PROC is the current server's process. PARSED is an erc-parsed response struct.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-capab.el.gz
(defun erc-capab-identify-remove/set-identified-flag (_proc parsed)
  "Remove PARSED message's id flag and add the `erc-identified' text property.

PROC is the current server's process.
PARSED is an `erc-parsed' response struct."
  (let ((msg (erc-response.contents parsed)))
    (when (and erc-capab-identify-activated
               (string-match "^\\([-\\+]\\)\\(.+\\)$" msg))
      (setf (erc-response.contents parsed)
            (if erc-capab-identify-mode
                (propertize (match-string 2 msg)
                            'erc-identified
                            (if (string= (match-string 1 msg) "+")
                                1
                              0))
              (match-string 2 msg)))
      nil)))