Code: Select all
proc *raw:cmds {from key arg} {
global botnick servername ochan klist u_cflood c_kreason c_ktime c_kcount host whatdoing host
if {$from != $servername} { return 0 }
if {[lindex $arg 2] == "Oper" && [lindex $arg 3] == "privs"} {
putquick "STATS c"
putquick "STATS v"
putquick "STATS p"
putquick "STATS o"
return 0
}
if {[lindex $arg 5] == "Flooder" && [lindex $arg 4] == "Possible"} {
set fnick [lindex $arg 5]
set fhost [lindex $arg 6]
set onserver [lindex $arg 8]
set target [lindex $arg 10]
set whatdoing [lrange $arg 4 end]
set host "[lindex [split "[lindex $arg 6]" "\[\]"]>-1]"
putquick "PRIVMSG $ochan :$whatdoing"
if {[lsearch -glob [string tolower $host] "*server.com"]>-1} {return 0}
if {[lsearch -glob [string tolower $host] "*111.222.333.444"]>-1} {return 0}
if {[lsearch -glob [string tolower $host] "*server1.com*"]>-1} {return 0}
scan $fhost "%\[^@]@%s" trash uhost
scan $uhost "%\[^]]]%s" host trash
if {[regexp -nocase $host $klist]} {
return 0
} else {
set klist "$klist $host"
timer 10 "remove_kline $host"
}
putlog "KLINE 10 *@$host :$fnick $fhost Stop flooding, please!"
}
}
Code: Select all
(13:10:56) -irc.server.com- *** Notice -- Possible Flooder nick[~ident@host] on irc.server.com target: #channel
Code: Select all
putlog "KLINE 10 *@$host :$fnick $fhost Stop flooding, please!"
Code: Select all
putlog "Flooder Nick: $fnick"
putlog "Flooder Identd: $fident"
putlog "Flooder Host: $fhost"