AntiSpam: Oops, inverted "unless" logic. Tricky, tricky "unless"!

This commit is contained in:
Pragmatic Software 2018-08-06 11:09:13 -07:00
parent a15da5a71b
commit d10acb815b
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ sub is_spam {
my $ret = eval {
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} }) {
return 1 if $text =~ m/$keyword/i;
}