3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02: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";
eval {
foreach my $trigger (@triggers) {
foreach my $trigger (@triggers) {
eval {
if ($message =~ m/$trigger->{trigger}/i) {
my ($desc, $timestamp) = $self->reset_counter($channel, $trigger->{target});
@ -600,11 +600,11 @@ sub on_public {
}
}
}
}
};
};
if ($@) {
$self->{pbot}->{logger}->log("Error in counter trigger: $@");
if ($@) {
$self->{pbot}->{logger}->log("Skipping bad trigger $trigger->{trigger}: $@");
}
}
$self->dbi_end;