Hey tu as eu une idée que moi meme je n'aivais pas vu :s
### ANTI MASS JOIN ###
proc detect_massjoin {idx sock chan nick} {
global c_ l_ salon nickmassjoin pooshy
foreach a $pooshy(chanexc) { if {$chan==$a} {return 0} }
if {![info exists c_($chan)]} {
set c_($chan) 1
if {[array exists l_]} { unset l_ }
set l_($nick) 1
utimer 2 [list unset c_($chan)]
} else {
if {$c_($chan) >= 5} {
set l_($nick) 1
set nickmassjoin "$nick"
putquick "notice Gpx : whois $nick"
foreach a [array names l_] {
unset l_($a)
}
} else { incr c_($chan); set l_($nick) 1; }
}
}
### Module des sockets ###
proc xsock00_event {idx arg} {
global sock00 pooshy botnick fichier
regsub -all {\\} $arg {\\\\} arg
regsub -all {\{} $arg {\{} arg
regsub -all {\}} $arg {\}} arg
regsub -all {\]} $arg {\]} arg
regsub -all {\[} $arg {\[} arg
regsub -all {\"} $arg {\"} arg
putloglev 8 * "\[IN\] $arg"
if {[lindex $arg 0]=="PING"} { putdcc $pooshy(idxR) "PONG [lrange $arg 1 end]"; return 0 }
if {[lindex $arg 1]=="NOTICE"} {
set nick [string trim [lindex [split $arg !] 0] :]
if {[string match #* [lindex $arg 2]]} { putquick "KILL $nick :1Veuillez éviter les notices salons sur les salons 1!officiels1!" }
}
if {[lindex $arg 1]=="JOIN"} {
set nick [string trim [lindex [split $arg !] 0] :]
set chan [string trim [lindex $arg 2] :]
if {$nick!=$pooshy(nickR)} { detect_massjoin $pooshy(idxR) $pooshy(nickR) $chan $nick }
}
}
proc xsock01_event {idx arg} {
global sock01 pooshy botnick fichier
regsub -all {\\} $arg {\\\\} arg
regsub -all {\{} $arg {\{} arg
regsub -all {\}} $arg {\}} arg
regsub -all {\]} $arg {\]} arg
regsub -all {\[} $arg {\[} arg
regsub -all {\"} $arg {\"} arg
putloglev 8 * "\[IN\] $arg"
if {[lindex $arg 0]=="PING"} { putdcc $pooshy(idxS) "PONG [lrange $arg 1 end]"; return 0 }
if {[lindex $arg 1]=="NOTICE"} {
set nick [string trim [lindex [split $arg !] 0] :]
if {[string match #* [lindex $arg 2]]} { putdcc $pooshy(idxR) ":$pooshy(nickR) KILL $nick :1Veuillez éviter les notices salons sur les salons 1!officiels1!" }
}
if {[lindex $arg 1]=="JOIN"} {
set nick [string trim [lindex [split $arg !] 0] :]
set chan [string trim [lindex $arg 2] :]
if {$nick!=$pooshy(nickS)} { detect_massjoin $pooshy(idxS) $pooshy(nickS) $chan $nick }
}
}
proc xsock10_event {idx arg} {
global sock10 pooshy botnick fichier nickmassjoin
regsub -all {\\} $arg {\\\\} arg
regsub -all {\{} $arg {\{} arg
regsub -all {\}} $arg {\}} arg
regsub -all {\]} $arg {\]} arg
regsub -all {\[} $arg {\[} arg
regsub -all {\"} $arg {\"} arg
putloglev 8 * "\[IN\] $arg"
if {[lindex $arg 0]=="PING"} { putdcc $pooshy(idxH) "PONG [lrange $arg 1 end]"; return 0 }
if {[lindex $arg 1]=="NOTICE"} {
set nick [string trim [lindex [split $arg !] 0] :]
if {[string match #* [lindex $arg 2]]} { putdcc $pooshy(idxR) ":$pooshy(nickR) KILL $nick :1Veuillez éviter les notices salons sur les salons 1!officiels1!" }
}
if {[lindex $arg 1]=="JOIN"} {
set nick [string trim [lindex [split $arg !] 0] :]
set chan [string trim [lindex $arg 2] :]
if {$nick!=$pooshy(nickH)} { detect_massjoin $pooshy(idxH) $pooshy(nickH) $chan $nick }
}
}
[15:56:45] » Join\ TesT - guest@687.578.532.513 -[1]- #!cotes-girondines!
[15:56:46] Modes sur #!cotes-girondines! : +stn
[16:01:19]
Jusque la tout va pour le mieux et me reste à cloner en croisant les doigts que cela fonctionne :s
Je te tiens au courant et si tu avais des eclairises de ton cotes ;)
merci a toi