Code: Select all
#Flood relay
proc *raw:flooder {from key arg} {
global botnick servername fnick ochan fhost onserver target whatdoing
if {[lindex $arg 5] == "Flooder"} {
set fnick [lindex $arg 6]
set fhost [lindex $arg 6]
set onserver [lindex $arg 8]
set target [lindex $arg 10]
set whatdoing [lrange $arg 4 end]
putquick "PRIVMSG $ochan :$whatdoing"
putquick "PRIVMSG $fnick :$fnick, detect flood from your host ($fhost) Please stop flooding $target. Thank You!"
return 0
}
}
Can you tell me how to give nick ident@host from them last in the different values to allow the bot to send PRIMSG of that nickname and tell him that it has detected a violation by ident@hostServer notice is:
irc.server.com *** Notice -- Possible Flooder nick[id@0.0.0.0] on irc.server.com target: nick1
I am writing here because I have no idea how to do this separation, since nick and hostname are held in arg 6
in tcl I need these values: $target $nickflooder $nickflooderID@HOST...To summarize:
1 = ***
2 = Notice
3 = -
4 = Possible
5 = Flooder
6 = nick [id@0.0.0.0]
........
10 = nick1
Thanks in advance and apologize for bad English