# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: deniz.a.m.dogan@gmail.com-20091229011859-\ # 9yhkud2wk8eh4z9t # target_branch: http://bzr.savannah.gnu.org/r/emacs/trunk # testament_sha1: dbf6e03535b76650439e85424d7dee67444fb100 # timestamp: 2009-12-29 02:19:26 +0100 # base_revision_id: tassilo@member.fsf.org-20091228193829-\ # k2uyvjstk4ukdlw1 # # Begin patch === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2009-10-31 02:38:34 +0000 +++ lisp/net/rcirc.el 2009-12-29 01:18:59 +0000 @@ -2477,6 +2477,35 @@ (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* ((nickname (cadr args)) + (idle-time (rcirc-format-seconds + (string-to-number + (caddr args)))) + (signon-time + (format-time-string "%c" (seconds-to-time + (string-to-number (cadddr args))))) + (result (format "%s has been idle for %s, signed on at %s" + nickname + idle-time + signon-time))) + (rcirc-print process sender "317" nil result))) + +(defun rcirc-format-seconds (seconds) + "Given a number of seconds, returns a string representation of +those seconds in hours, minutes and seconds." + (cond + ((> seconds most-positive-fixnum) "very long") + ((= seconds 0) "0s") + (t + (let ((res (format-seconds "%hh %mm %ss" seconds))) + (while (string-match "\\<0[hms] ?" res) + (setq res (replace-match "" nil t res))) + (when (string-match " +$" res) + (setq res (replace-match "" nil t res))) + res)))) + (defun rcirc-handler-332 (process sender args text) "RPL_TOPIC" (let ((buffer (or (rcirc-get-buffer process (cadr args)) # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWXVAgdYAAi1/gGsQMgBWf//3 1ubYjr////BQBRhVvWg7G7dGNtjncJJE0AmQnlPUZMjEyaTamT0IaAAGnqepoElAJo0NBJkaQ0Gg BoNAAAAAJTRCTKemUeiGoxMymjTQZPKGgA9Rpk00NDjJk0YhiaYCBgTTBGCYmmmgAwgkppEy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