Code: Select all
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
return 1
} {
set throttled($id) [clock sec]
utimer $time [list unset throttled($id)]
return 0
}
}
if {[throttled $host,$chan 10]} {
return 0
} else {
If someone could give me a heads up, it would be appreciatedarfer wrote:Code: Select all
foreach dayname {sunday monday tuesday wednesday thursday friday saturday} { bind PUB - !$dayname [list pDailySchedule $dayname] } proc pDailySchedule {dayname nick uhost hand chan text} { if {[file exists ${dayname}.txt]} { set id [open ${dayname}.txt r] set schedule [split [read -nonewline $id] \n] close $id if {[llength $schedule] != 0} { putserv "PRIVMSG $chan :Schedule for [string totitle $dayname]" foreach item $schedule { putserv "PRIVMSG $chan :$item" } } else {putserv "PRIVMSG $chan :There are no scheduled events for [string totitle $dayname]"} } else {putserv "PRIVMSG $chan :Missing file ${dayname}.txt"} return 0 }