egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Online Time Counter

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Hellboarder
Voice


Joined: 22 Oct 2007
Posts: 3

PostPosted: Mon Oct 22, 2007 1:18 pm    Post subject: Online Time Counter Reply with quote

Hi all

First : Sorry for bad english Wink

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
View user's profile Send private message
Hellboarder
Voice


Joined: 22 Oct 2007
Posts: 3

PostPosted: Wed Oct 24, 2007 11:13 am    Post subject: Reply with quote

Nobody an idea ?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 24, 2007 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Hellboarder
Voice


Joined: 22 Oct 2007
Posts: 3

PostPosted: Wed Oct 24, 2007 1:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 24, 2007 1:35 pm    Post subject: Reply with quote

Where should it "register" the information? Data format/layout?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber