3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 19:52:34 +01:00

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

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;
}