Function: rcirc-handler-317

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

Signature

(rcirc-handler-317 PROCESS SENDER ARGS TEXT)

Documentation

Handle idle messages from SENDER (RPL_WHOISIDLE).

ARGS should have the form (NICK IDLE-SECS SIGNON-TIME). PROCESS is the process object for the current connection.

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-handler-317 (process sender args _text)
  "Handle idle messages from SENDER (RPL_WHOISIDLE).
ARGS should have the form (NICK IDLE-SECS SIGNON-TIME).
PROCESS is the process object for the current connection."
  (let* ((nick (nth 1 args))
         (idle-secs (string-to-number (nth 2 args)))
         (idle-string (format-seconds "%yy %dd %hh %mm %z%ss" idle-secs))
         (signon-time (string-to-number (nth 3 args)))
         (signon-string (format-time-string "%c" signon-time))
         (message (format "%s idle for %s, signed on %s"
                          nick idle-string signon-string)))
    (rcirc-print process sender "317" nil message t)))