mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
AntiSpam: "unless" is too confusing
This commit is contained in:
parent
e861c9dea2
commit
bb11282e13
@ -50,11 +50,12 @@ sub is_spam {
|
||||
|
||||
my $ret = eval {
|
||||
foreach my $space (keys %{ $self->{keywords}->hash }) {
|
||||
next unless $all_namespaces and $namespace =~ m/^$space$/i;
|
||||
if ($all_namespaces or $namespace =~ m/^$space$/i) {
|
||||
foreach my $keyword (keys %{ $self->{keywords}->hash->{$space} }) {
|
||||
return 1 if $text =~ m/$keyword/i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user