| View previous topic :: View next topic |
| Author |
Message |
vlada Voice
Joined: 29 Oct 2006 Posts: 5
|
Posted: Mon Oct 30, 2006 12:55 pm Post subject: Auto channel msg |
|
|
Hi there, i use this tcl:
| Code: | set idx 0
set msgs {"spam 1" "spam 2" "spam 3"}
set chans(0) {#chan1 #chan2} ;# chans for msg1
set chans(1) {#chan3 #chan4} ;# chans for msg2
set chans(2) {#chan5 #chan6} ;# chans for msg3
bind time - * foo
proc foo {m args} {
if {$m!="08" && $m!="09" && $m%20==0} {
foreach c $::chans($::idx) {
puthelp "privmsg $c :[lindex $::msgs $::idx]"
}
if {[incr ::idx] == [llength $::msgs]} {set ::idx 0}
}
}
|
but this send msg every one hour not 20 min,i need to send every 20 (or 10) min. how to set up this? thanks |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Oct 30, 2006 1:09 pm Post subject: |
|
|
BIND:
(37) TIME (stackable)
bind time <flags> <mask> <proc>
proc-name <minute> <hour> <day> <month> <year>
Description: allows you to schedule procedure calls at certain
times. mask matches 5 space separated integers of the form:
"minute hour day month year". minute, hour, day, month have a
zero padding so they are exactly two characters long; year is
four characters. Flags are ignored.
Module: core
Soooo.....
bind time - "10 * * * *"
bind time - "20 * * * *"
bind time - "30 * * * *"
bind time - "40 * * * *"
bind time - "50 * * * *"
bind time - "00 * * * *"
Or just use a timer set to go every 10 or 20 mins..
BTW the rest of your proc makes no sense and will not work. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Oct 30, 2006 7:24 pm Post subject: |
|
|
bind time - "?0 * * * *" your:proc _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
|