set reachdate mm/dd/yy
bind time - * postmsg
proc postmsg {m h args} {
global reachdate
if {!([scan $h %d]%3)} {
set date [clock scan $reachdate]
set fulldate [clock format $date -format "%B %d %Y"]
set dur [duration [expr {$date-[clock seconds]}]]
puthelp "privmsg #channel :A new feature will be available by $fulldate. Until then there are still $dur."
}
}
set reachdate mm/dd/yy
bind time - "00 *" postmsg
proc postmsg {m h args} {
global reachdate
if {[scan $h %d]%3 == 0} {
set date [clock scan $reachdate]
set fulldate [clock format $date -format "%B %d %Y"]
set dur [germanize [duration [expr {$date-[clock seconds]}]]]
puthelp "privmsg #channel :A new feature will be available by $fulldate. Until then there are still $dur."
}
}
proc germanize str {
regsub -nocase {week(s?)} $str "wochen" str
regsub -nocase {hour(s?)} $str "stunden" str
regsub -nocase {day(s?)} $str "tage" str
set str
}
Edit: added translating weeks, hours, and days to german.
Last edited by Sir_Fz on Fri May 05, 2006 7:27 pm, edited 2 times in total.