Code: Select all
bind time - "33 15 *" BREAKTIME
################
proc BREAKTIME {nick uhost hand chan arg} {
putquick "PRIVMSG $chan :something....."
return 0
}
Code: Select all
bind time - "33 15 *" BREAKTIME
################
proc BREAKTIME {nick uhost hand chan arg} {
putquick "PRIVMSG $chan :something....."
return 0
}
Code: Select all
(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
Your not naming your variables correctly, but you kept the 5 expected by a bind to time. You may want to use "minutes hours day month year" instead. Then you can see the next issue you will have. A bind to time doesn't give you any $chan argument to use no matter where you place it. You need to place the message staticly:cache wrote:Am trying to make the bot say something once a day, but what am I doing wrong? I kept getting errors untill I made it "nick uhost hand chan arg" but doesn't display the message or show any error.Code: Select all
bind time - "33 15 *" BREAKTIME ################ proc BREAKTIME {nick uhost hand chan arg} { putquick "PRIVMSG $chan :something....." return 0 }
cache wrote:so the $chan part has to be static? No way to make this work in all rooms it is in?
Code: Select all
# Sure, you just change this:
putquick "PRIVMSG #chan :something....."
# To this:
foreach chan [channels] {
putquick "PRIVMSG $chan :something....."
}
I have it like this now and it worksspeechles wrote:cache wrote:so the $chan part has to be static? No way to make this work in all rooms it is in?Code: Select all
# Sure, you just change this: putquick "PRIVMSG #chan :something....." # To this: foreach chan [channels] { putquick "PRIVMSG $chan :something....." }
Code: Select all
##########
bind time - "33 15 *" BREAKTIME
proc BREAKTIME {nick uhost hand chan arg} {
foreach chan [channels] {
putquick "PRIVMSG $chan :something....."
}
return 0
}
##########