Code: Select all
tag when posting logs, code
Code: Select all
proc checkdrone {n u h c} {
global droneip
if {(![botisop $c]) || ([matchattr $h of|of])} {return}
scan $u %\[^@\]@%s u host
set u [string trimleft $u ~]
if {([info exists droneip($n)]) || ([string length $n] < 5) || ([string length $n] > 11) || ([string length $u] < 4)} {return}
if {([string is alpha $n]) && ([string is alpha $u])} {
if {([check:drone $n] == 1) && ([check:drone $u] == 1)} {
putquick "KICK $c $n :DRONE!!" -next
}
if {![info exists droneip($n)]} {set droneip($n) 0}
timer 300 [list unset droneip($n)]
}
}
proc check:drone {d} {
set l2 [string length $d] ; set l3 [expr [expr $l2/2]-1]
set part1 [string range $d 0 2] ; set part2 [string range $d end-2 end]
set part3 [string range $d $l3 [expr $l3+2]]
if {([c:d $part1] == 1)||([c:d $part2] == 1)||([c:d $part3] == 1)} {return 1}
return 0
}
proc c:d {d} {
set ln [string length $d]
if {[llength [regexp -all -inline \[aeiou\] $d]] >= 1} {return 0}
if {[llength [regexp -all -inline (aaa|bbb|ccc|ddd|eee|fff|ggg|hhh|iii|jjj|kkk|lll|mmm|nnn|ooo|ppp|qqq|rrr|sss|ttt|uuu|vvv|www|xxx|yyy|zzz) $d]] >= 2} {return 0}
return 1
}
Code: Select all
if {([check:drone $n] == 1) || ([check:drone $trimud] == 1)} {