mirror of https://github.com/pragma-/pbot.git
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…
Reference in New Issue