| View previous topic :: View next topic |
| Author |
Message |
cvanmeer Halfop
Joined: 02 Dec 2003 Posts: 40 Location: The Netherlands
|
Posted: Fri Dec 10, 2010 8:37 pm Post subject: Problem with getchanidle in combination with aidle.tcl |
|
|
Hi all,
I am trying to use the aidle.tcl script.
So I set the maxidle to 2 hours...so after 2 hours of idle time of the user in the channel, the user should be kicked.
But it's not working the way I supposed to.
It seems that the getchanidle is not the same as the WHOIS $nick $nick.
When I restart the bot, the getchanidle timer get's set to 0.
But at the same time, when I check the idle time of a user in my IRC client it says the user is idle for 2hr, 1m, 45s.
So for the script to be affective, the bot should never be restarted...and if it was restarted...it would take up to two hours to build up his own timer and then start kicking, while in that 2 hours...a user could be already idle for more than 2 hours (as seen in the IRC client)
I bet I'm not the first to run into this problem. Could someone tell me how to solve this?
Thx.
Chris |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Dec 11, 2010 10:16 am Post subject: |
|
|
Well, as you've already noticed, the getchanidle is not related to any WHOIS-info, but merely the difference of the time when the bot last saw any actions from the user, and "now". Thus, as it joins, that point in time becomes the last known time of activity.
WHOIS on the other hand, does not provide channel-specific timestamps, but merely when the user sent any kind of actions. Further, some (most?) networks only send the last action data for local clients, requiring remote server lookups. Add to that, the fact that WHOIS-lokups are generally more expensive than NAMES or WHO (which fetch a set of channel members rather than one nickname at a time), and it becomes rather obvious why eggdrop don't use WHOIS-timestamps for the getchanidle command.
To implement your own solution, you'd have to issue the proper whois-command, and catch the result using raw-bindings (sorry, don't remember the actual codes right now, but you'll find them in rfc1459 and the later updates).
Edit: Had the wrong rfc-document: 1459 is the correct one. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
cvanmeer Halfop
Joined: 02 Dec 2003 Posts: 40 Location: The Netherlands
|
Posted: Wed Dec 15, 2010 8:03 am Post subject: |
|
|
Thank you.
I've combined my script with a RAW 319 binding to check the 'complete' idle time. It's now working exactly as I planned  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|