mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 02:24:25 +01:00
Skip only bad triggers instead of all triggers
This commit is contained in:
parent
a8983d3a86
commit
d48cc9d976
@ -588,8 +588,8 @@ sub on_public {
|
||||
|
||||
my $message = "$nick!$user\@$host $msg";
|
||||
|
||||
eval {
|
||||
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: $@");
|
||||
$self->{pbot}->{logger}->log("Skipping bad trigger $trigger->{trigger}: $@");
|
||||
}
|
||||
}
|
||||
|
||||
$self->dbi_end;
|
||||
|
Loading…
Reference in New Issue
Block a user