mirror of
https://github.com/pragma-/pbot.git
synced 2025-04-01 05:17:00 +02:00
AntiSpam: Oops, inverted "unless" logic. Tricky, tricky "unless"!
This commit is contained in:
parent
a15da5a71b
commit
d10acb815b
@ -50,7 +50,7 @@ sub is_spam {
|
|||||||
|
|
||||||
my $ret = eval {
|
my $ret = eval {
|
||||||
foreach my $space (keys %{ $self->{keywords}->hash }) {
|
foreach my $space (keys %{ $self->{keywords}->hash }) {
|
||||||
next unless not $all_namespaces and $namespace =~ m/^$space$/i;
|
next unless $all_namespaces and $namespace =~ m/^$space$/i;
|
||||||
foreach my $keyword (keys %{ $self->{keywords}->hash->{$space} }) {
|
foreach my $keyword (keys %{ $self->{keywords}->hash->{$space} }) {
|
||||||
return 1 if $text =~ m/$keyword/i;
|
return 1 if $text =~ m/$keyword/i;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user