summaryrefslogtreecommitdiff
path: root/lisp/net/rcirc.el
diff options
context:
space:
mode:
authorDeniz Dogan <deniz.a.m.dogan@gmail.com>2011-02-07 01:12:17 +0100
committerDeniz Dogan <deniz.a.m.dogan@gmail.com>2011-02-07 01:12:17 +0100
commitc5aff743c3963a8fdaab628d2b695df50432e0de (patch)
treec599208371598e26813110b571794f1f92519fe4 /lisp/net/rcirc.el
parent03925868edfb3f284b32d16af088a21301702123 (diff)
downloademacs-c5aff743c3963a8fdaab628d2b695df50432e0de.tar.gz
* lisp/net/rcirc.el (rcirc-handler-317): New function. (Bug#6507)
Diffstat (limited to 'lisp/net/rcirc.el')
-rw-r--r--lisp/net/rcirc.el14
1 files changed, 14 insertions, 0 deletions
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))