Hi, i wonder if i could get some help asusal.....
If i write !Summer the bot will say its x Week x Days x Hours x Min to 9th Juny....
And every new day 00:00:01 the bot will channge topic to Summer: Its 59 Days to summer.... I hope you could understand....
set summer "June 9 00:00:00 2005"
bind pub -|- !summer pub:summer
bind time - "00 00 * * *" topic:summer
setudef flag summer
proc pub:summer {nick uhost hand chan text} {
if ![channel get $chan summer] return
set usummer [clock scan $::summer]
set sleft [expr $usummer-[clock seconds]]
putserv "PRIVMSG $chan :There are [duration $sleft] days left until summer."
}
proc topic:summer {min hour day month year} {
set usummer [clock scan $::summer]
set dleft [expr ($usummer-[clock seconds])/86400]
foreach c [channels] {
if {[channel get $c summer]} {
putserv "TOPIC $c :Summer: There are $dleft days left until summer."
}
}
}
Set the channels you want it active in to +summer
.chanset #channel +summer
*Edit* Fixed a typo.
Last edited by greenbear on Sun Mar 06, 2005 7:07 pm, edited 1 time in total.