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 

Cycle every 15 minutes

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


Joined: 06 Jan 2011
Posts: 3

PostPosted: Thu Jan 06, 2011 10:03 am    Post subject: Cycle every 15 minutes Reply with quote

Hello,

How to make bot cycle certain channel every 15 minutes?
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Thu Jan 06, 2011 7:12 pm    Post subject: Reply with quote

hmm,

'bind time' or some timer with:
Code:
channel set $chan +inactive                                                               
channel set $chan -inactive


should do the work
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Jan 07, 2011 2:26 am    Post subject: Reply with quote

If you've got the 1.6.20 version of Eggdrop, then you could use the new "CRON" binding to achieve this:
Code:

bind cron - {*/15 * * * *} cron:cycle

proc cron:cycle {minute hour day month weekday} {
channel set #channel +inactive
channel set #channel -inactive
}

Or if you wish to have it running in multiple channels by simplifying set/unset ('.chanset #channel +croncycle' to activate and '.chanset #channel -croncycle' to deactivate to disable it) a flag to the channel ('croncycle' in this case, but can be changed to whatever you wish as long as isn't used already) info then something like:
Code:

setudef flag croncycle
bind cron - {*/15 * * * *} cron:cycle

proc cron:cycle {minute hour day month weekday} {
   foreach chan [channels] {
      if {![channel get $chan croncycle]} continue
      channel set $chan +inactive
      channel set $chan -inactive
   }
}

_________________
Once the game is over, the king and the pawn go back in the same box.
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