# Set this in the format "MIN:HOUR:DAY:MONTH:YEAR"
# Not all fields are needed. THe more included, the more precices the timer
# Feilds can be omited, by leaving them blank. All feilds are 2 digits (though year may be 4)
# EG
# Miday = 00:12
# Every hour = 00
# Every hour, only on the 2nd of the month = 00::02
set timed(mask) "00:12"
# Set the channel the msg'es will be sent
set timed(channel) "#channel"
# What msg'es to send
set timed(msges) {
"Our message goes here, in IRCD command format"
"Another msg goes here"
"Here another"
}
bind time - "*" message:timed
proc message:timed {args} {
global timed
set idx 0
set temp [split $timed(mask) :]
foreach a $args {
if {([lindex $temp $idx] == [lindex $args $idx]) || ([lindex $temp $idx] == "")} {
incr idx
continue
} else {
return
}
}
puthelp "PRIVMSG $timed(channel) :[lindex $timed(msges) [rand [llength $timed(msges)]]]"
}
Guess who is borring round here.. :]
Once the game is over, the king and the pawn go back in the same box.
thanks - thing is tho, I want one specific msg to go at 00:12, another at 00:13, and so on for 24 msgs (one for every hour) not just random msgs going at the time - so wont I need to state somewhere all the different times for the various mesages? (im using it like a clock that will announce the time of day to the channel and a message after it)
like this which I currently do on a mIRC bot:
[09:00:00] <News24> 09:00 New York - 08:00 Chicago - 30 mins to U.S. Opening Bell (Mon-Fri)
You did say "24 msgs - one for each hour - 00:00 thru 00:23 - all saying something different..." and didn't mention half-hours or anything. This is only turning out to be tricky because you are being rather unclear! So are you saying you want this to work for *any* time?
You almost had it! You changed the right parts, the only other thing you had to do was change timemsg($hour) to timemsg($hour:$min). (I also changed the name of the proc because hourly_message doesn't make sense anymore.)