Code: Select all
bind kick * * unaop
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
return 1
} {
set throttled($id) [clock seconds]
utimer $time [list unset throttled($id)]
return 0
}
}
proc unaop {nick host hand chan target reason} {
set ktime "3"
if {[throttled $host,$chan $ktime] && [isop $nick $chan] && ![validuser [nick2hand $nick $chan]]} {
putserv "PRIVMSG chanserv :aop $chan del $nick"
}
}
Code: Select all
if {[validuser $hand]} return
if {[throttled $chan,$host]} {
putserv "PRIVMSG chanserv :aop $chan del $nick"
}
Code: Select all
if {[info exists throttled($id)]} {
return 1
}
Code: Select all
proc throttled {id} {
global throttled
if {[info exists throttled($id)]} {
if {$throttled($id) >= 3} {
list unset throttled($id)
return 1
} else {
incr $throttled($id)
}
} else {
set throttled($id) 1
}
utimer 3 [list unset throttled($id)]
}