3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-08 19:12:33 +01:00

Plugin/ActionTrigger: don't handle events already processed by another command

This commit is contained in:
Pragmatic Software 2024-11-21 16:05:44 -08:00
parent 888da7dda1
commit 947082f2a2
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 9 additions and 3 deletions

View File

@ -366,7 +366,7 @@ sub get_trigger($self, $channel, $trigger) {
} }
sub on_kick($self, $event_type, $event) { sub on_kick($self, $event_type, $event) {
# don't handle this event if it was caused by a bot command # don't handle this event if it was processed by a bot command
return 0 if $event->{interpreted}; return 0 if $event->{interpreted};
my ($nick, $user, $host) = ( my ($nick, $user, $host) = (
@ -387,6 +387,9 @@ sub on_kick($self, $event_type, $event) {
} }
sub on_action($self, $event_type, $event) { sub on_action($self, $event_type, $event) {
# don't handle this event if it was processed by a bot command
return 0 if $event->{interpreted};
my ($nick, $user, $host, $msg) = ( my ($nick, $user, $host, $msg) = (
$event->nick, $event->nick,
$event->user, $event->user,
@ -403,6 +406,9 @@ sub on_action($self, $event_type, $event) {
} }
sub on_public($self, $event_type, $event) { sub on_public($self, $event_type, $event) {
# don't handle this event if it was processed by a bot command
return 0 if $event->{interpreted};
my ($nick, $user, $host, $msg) = ( my ($nick, $user, $host, $msg) = (
$event->nick, $event->nick,
$event->user, $event->user,

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4853, BUILD_REVISION => 4854,
BUILD_DATE => "2024-11-15", BUILD_DATE => "2024-11-21",
}; };
sub initialize {} sub initialize {}