From c5aff743c3963a8fdaab628d2b695df50432e0de Mon Sep 17 00:00:00 2001 From: Deniz Dogan Date: Mon, 7 Feb 2011 01:12:17 +0100 Subject: [PATCH] * lisp/net/rcirc.el (rcirc-handler-317): New function. (Bug#6507) --- lisp/ChangeLog | 4 ++++ lisp/net/rcirc.el | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 69ed03e7cba..3d20d7001d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-02-07 Deniz Dogan + + * net/rcirc.el (rcirc-handler-317): New function (Bug#6507). + 2011-02-06 Jay Belanger * calc/calc.el (calc-logunits-field-reference) Renamed from diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 87db130f1ea..21934ce8b01 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2592,6 +2592,20 @@ keywords when no KEYWORD is given." (setq rcirc-nick-away-alist (cons (cons nick away-message) rcirc-nick-away-alist)))))) +(defun rcirc-handler-317 (process sender args text) + "RPL_WHOISIDLE" + (let* ((nick (nth 1 args)) + (idle-secs (string-to-number (nth 2 args))) + (idle-string + (if (< idle-secs most-positive-fixnum) + (format-seconds "%yy %dd %hh %mm %z%ss" idle-secs) + "a very long time")) + (signon-time (seconds-to-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))) + (defun rcirc-handler-332 (process sender args text) "RPL_TOPIC" (let ((buffer (or (rcirc-get-buffer process (cadr args)) -- 2.11.4.GIT