erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-discuss] /massidle: how to return idle times for all users in a cha


From: Karl Pestka
Subject: [Erc-discuss] /massidle: how to return idle times for all users in a channel?
Date: Sun, 15 Mar 2009 15:24:39 +0000

Hello,

I'm trying to come up with an erc-cmd-MASSIDLE command, which returns idle times of all users in a channel that I operate, regardless of whether we're on the same server. However, I'm quite new to elisp and need some advice. I'm hampered by two difficulties:

1. /whois and /idle only take single nick arguments...

2. If the user is on another server, I have to run /whois nick nick to get their idle time, I can't use /idle.

I thought of adapting Sebastian Freundt's erc-cmd-MASSOP code, but because both /whois and /idle only take single nicks, the following doesn't work:

(defun erc-cmd-MASSIDLE (&rest ignore)
  (setq reason (mapconcat #'identity reason " "))
  (let ((hash-table erc-channel-users)
        users)
    (maphash (lambda (k v)
               (unless (equal k erc-nick)
                 (add-to-list 'users k)))
             hash-table)
    (eval `(erc-cmd-IDLE ,@users))))
I'm using ERC v5.3
and GNU Emacs 22.2.50.1 (powerpc-apple-darwin9.3.0, Carbon Version 1.6.0) of 2008-07-17 on cf-ppc-macosx.usr.sourceforge.jp

What's the best way to /massidle a channel?

Thanks!
karl





<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
karl pestka
www.theairelectric.com
www.karlpestka.com      
+1 734 274 2169
+354 821 7869
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>








reply via email to

[Prev in Thread] Current Thread [Next in Thread]