No need to install anything extra AFAIK. Could you elaborate a bit? Give a few examples and the reason you think the script should react?Casey952 wrote:All Protection regular expressions does not detect and does nothing.
Random Drones and Caps that use regular expressions are not detecting and does nothing, does not warn, kick, ban.
Do we need to install a regex package for regular expressions to work? (Debian)
Many Thanks.
Code: Select all
lappend ap:udefs {ap:drones "+ 180 45 2"}
Code: Select all
lappend ap:udefs {ap:caps "60:90 120 w:k:kb 2"}
Code: Select all
# Use .chanset #channel ap:drones + <btime> <pmeth> <btype> (in DCC to enable)
# Set default value here: (+ enabled, - disabled)
# If you set <pmeth> to a positive-integer then the bot will only kick the drone once.
# So if the drone rejoins within this amount of seconds it won't be kicked again.
lappend ap:udefs {ap:drones "+ 180 45 2"}
Code: Select all
# * All settings are enabled via .chanset DCC command. Example: .chanset #channel ap:textl 5:2 15 w:k:kb 2
# this will enable the text flood (lines) protection on #channel (punish on 5 lines or more in 2 seconds)
# 1st warn - 2nd kick - 3rd kickban. ban is 15 minutes and ban type is 2.
1 means there was a match, otherwise the output is 0.% regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} "aasdsds" dronm
1
% puts $dronm
sdsds
it did not kick using that nick.qhubekela [qhubekela@bombshellz/user/...]
qhubekela was kicked from #bombshellz by BattleStar [Possible random drone detected. (*qh*) :: [Sat Apr 30
11:45:48 2011] - Banned 0 minutes ·43·]
Code: Select all
"drones" {
variable droneexempts
if {$off != "+"} {return 0}
set Nod 0
if {[info exists droneexempts([set chan [string tolower $chan]])]} { set l $droneexempts($chan) } { set l $droneexempts(global) }
foreach e $l { if {[string match -nocase $e $nick!$uhost]} {set Nod 1 ; break} }
if {$Nod} {return 0}
set id [string trimleft [lindex [split $uhost @] 0] ~]
if {[follow 2 dr:$chan 3] != -1} {return 0}
if {[regexp {^[a-z]{4,}![a-z]{4,}$} $nick!$id]} {
if {(![string match {*[aeiou]*} $nick]) || ([regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} $nick dronm] && ![regexp {a{3}|e{3}|i{3}|o{3}|u{3}} $nick])} {
if {![info exists dronm]} { set dronm "no vowels" }
droneb $nick $uhost $chan $btime $pmeth $btype *$dronm*
} elseif {![string match *$id* $nick] && [regexp {q[bcdfghknpqrstwzxv]|x[dfghkmnqrvz]|z[bcdfhmqrtvx]|v[bfghkmnqxw]|g[zv]|kz|bgb|wj|lx|jwm} $nick dronm]} {
droneb $nick $uhost $chan $btime $pmeth $btype *$dronm*
}
}
}
Code: Select all
elseif {![string match *$id* $nick] && [regexp {q[bcdfghknpqrstwzxv]|x[dfghkmnqrvz]|z[bcdfhmqrtvx]|v[bfghkmnqxw]|g[zv]|kz|bgb|wj|lx|jwm} $nick dronm]} {
Code: Select all
user@blah ~ $ tclsh
% regexp {^[^aeiou]{4}|[aeiou]{4}|q[^ua]|[^aeioux]x[^aeiouyx]|[^aeiouy]{5}} "aasdsds" dronm
1
%
The condition for the drones punishment requires that both the nickname and ident are 4 or more lower case alphabets (non-numeric). Since "b4b59a4a" fails this check, it's not considered a drone.Casey952 wrote:qhubekela ! b4b59a4a@* -- does not kick
qhubekela ! casey@* -- kicks
When the ident has certain things in it, it does not kick (nick qhubekela)