erotism Voice

Joined: 10 Aug 2010 Posts: 13 Location: Sofia, Bulgaria
|
Posted: Sun Apr 29, 2012 6:30 am Post subject: TCM.tcl help.. |
|
|
Here si code who I want to modify..
| Code: | 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!"
}
} |
On flood I received snotice:
| Code: |
(13:10:56) -irc.server.com- *** Notice -- Possible Flooder nick[~ident@host] on irc.server.com target: #channel |
How to make a bot to take nick ident and host from servernotice and set them as $fnick $fident and $fhost, and..
| Code: | | putlog "KLINE 10 *@$host :$fnick $fhost Stop flooding, please!" |
becoming..
| Code: | putlog "Flooder Nick: $fnick"
putlog "Flooder Identd: $fident"
putlog "Flooder Host: $fhost" |
|
|