Code: Select all
[regexp {#.+?} $chan]
Code: Select all
#set time in seconds to wait after the user can use the command.
set antiflood "10"
variable flood
proc {} {
if {![info exists flood($chan)]} {set flood($chan) 0}
if {[unixtime] - $flood($chan) <= $antiflood} {return}
set flood($chan) [unixtime]
code here...
}