3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

Skip only bad triggers instead of all triggers

This commit is contained in:
Pragmatic Software 2016-02-14 18:29:00 -08:00
parent a8983d3a86
commit d48cc9d976

View File

@ -588,8 +588,8 @@ sub on_public {
my $message = "$nick!$user\@$host $msg"; my $message = "$nick!$user\@$host $msg";
eval { foreach my $trigger (@triggers) {
foreach my $trigger (@triggers) { eval {
if ($message =~ m/$trigger->{trigger}/i) { if ($message =~ m/$trigger->{trigger}/i) {
my ($desc, $timestamp) = $self->reset_counter($channel, $trigger->{target}); my ($desc, $timestamp) = $self->reset_counter($channel, $trigger->{target});
@ -600,11 +600,11 @@ sub on_public {
} }
} }
} }
} };
};
if ($@) { if ($@) {
$self->{pbot}->{logger}->log("Error in counter trigger: $@"); $self->{pbot}->{logger}->log("Skipping bad trigger $trigger->{trigger}: $@");
}
} }
$self->dbi_end; $self->dbi_end;