| View previous topic :: View next topic |
| Author |
Message |
Hellboarder Voice
Joined: 22 Oct 2007 Posts: 3
|
Posted: Mon Oct 22, 2007 1:18 pm Post subject: Online Time Counter |
|
|
Hi all
First : Sorry for bad english
Im searching for a script which counts the online times of all users in a channel the past 7 days.
Then it should send a message to all users who were at least 48 hours in the channel.
Greets Hellboarder
PS : If this is to complicated , an script which does only the first part whould help me too |
|
| Back to top |
|
 |
Hellboarder Voice
Joined: 22 Oct 2007 Posts: 3
|
Posted: Wed Oct 24, 2007 11:13 am Post subject: |
|
|
| Nobody an idea ? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 24, 2007 11:44 am Post subject: |
|
|
I guess something like this should do the trick:
| Code: | #Returns the number of seconds nick has been visiting channel
proc onlinetime {nick channel} {
return [expr [clock seconds] - [getchanjoin $nick $channel]]
} |
| Code: | #Sends message to all members of channel who joined more than 48hours ago
proc checkjoined {channel message} {
set threshold [expr [clock seconds] - 172800]
foreach nick [chanlist $channel] {
if {[getchanjoin $nick $channel] < $threshold} {
puthelp "PRIVMSG $nick :$message"
}
}
} |
You'll most likely need some glue-code to implement this... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Hellboarder Voice
Joined: 22 Oct 2007 Posts: 3
|
Posted: Wed Oct 24, 2007 1:20 pm Post subject: |
|
|
hm think its not clear what the script should do^^
It should register the complete time a user was on the channel. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 24, 2007 1:35 pm Post subject: |
|
|
Where should it "register" the information? Data format/layout? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|