Function: rcirc-handler-301

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

Signature

(rcirc-handler-301 PROCESS SENDER ARGS TEXT)

Documentation

Handle away messages (RPL_AWAY).

ARGS should have the form (NICK AWAY-MESSAGE). PROCESS is the process object for the current connection.

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-handler-301 (process _sender args text)
  "Handle away messages (RPL_AWAY).
ARGS should have the form (NICK AWAY-MESSAGE).
PROCESS is the process object for the current connection."
  (let* ((nick (cadr args))
         (rec (assoc-string nick rcirc-nick-away-alist))
         (away-message (nth 2 args)))
    (when (or (not rec)
              (not (string= (cdr rec) away-message)))
      ;; away message has changed
      (rcirc-handler-generic process "AWAY" nick (cdr args) text)
      (if rec
          (setcdr rec away-message)
        (setq rcirc-nick-away-alist (cons (cons nick away-message)
                                          rcirc-nick-away-alist))))))