Function: rcirc-log

rcirc-log is a byte-compiled function defined in rcirc.el.gz.

Signature

(rcirc-log PROCESS SENDER RESPONSE TARGET TEXT)

Documentation

Record TEXT from SENDER to TARGET to be logged.

The message is logged in rcirc-log, and is later written to disk. PROCESS is the process object for the current connection.

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-log (process sender response target text)
  "Record TEXT from SENDER to TARGET to be logged.
The message is logged in `rcirc-log', and is later written to
disk.  PROCESS is the process object for the current connection."
  (let ((filename (funcall rcirc-log-filename-function process target))
        (time (and-let* ((time (rcirc-get-tag "time")))
                (parse-iso8601-time-string time t))))
    (unless (null filename)
      (let ((cell (assoc-string filename rcirc-log-alist))
            (line (concat (format-time-string rcirc-log-time-format time)
                          (substring-no-properties
                           (rcirc-format-response-string process sender
                                                         response target text))
                          "\n")))
        (if cell
            (setcdr cell (concat (cdr cell) line))
          (setq rcirc-log-alist
                (cons (cons filename line) rcirc-log-alist)))))))