This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Procedure to start, stop or continue a procedure

Help for those learning Tcl or writing their own scripts.
Post Reply
R
RowdyOne
Voice
Posts: 3
Joined: Mon Aug 24, 2009 2:38 am

Procedure to start, stop or continue a procedure

Post by RowdyOne »

Hello! Hoping to get some help.

I am trying to cobble together a procedure which I can prepend to a small quote script I am using.

I need it to check the time of the day and allow the procedure to start or continue between 12am and 8am, for example.

I also need it to stop the procedure from starting or continuing outside those times

While I have some experience managing an eggdrop and using different scripts this is the first time I have tried to make a significant modification to one.

Thank you in advance for anything you can help me with here!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set t [strftime %H]
if {$t >= 8 and $t < 12} {
 # proc does not trigger between 8 am and 12 am
 return
}
R
RowdyOne
Voice
Posts: 3
Joined: Mon Aug 24, 2009 2:38 am

Post by RowdyOne »

You sooooo rock!
Post Reply