3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Plugins/ActionTrigger: act upon bot commands too

This commit is contained in:
Pragmatic Software 2020-04-28 14:55:27 -07:00
parent d290fe1819
commit 7f700cc115

View File

@ -240,7 +240,7 @@ sub on_action {
my ($self, $event_type, $event) = @_;
my ($nick, $user, $host, $msg) = ($event->{event}->nick, $event->{event}->user, $event->{event}->host, $event->{event}->args);
my $channel = $event->{event}->{to}[0];
return 0 if $event->{interpreted};
#return 0 if $event->{interpreted};
$msg =~ s/^\/me\s+//;
$self->check_trigger($nick, $user, $host, $channel, "ACTION $msg");
return 0;
@ -250,7 +250,7 @@ sub on_public {
my ($self, $event_type, $event) = @_;
my ($nick, $user, $host, $msg) = ($event->{event}->nick, $event->{event}->user, $event->{event}->host, $event->{event}->args);
my $channel = $event->{event}->{to}[0];
return 0 if $event->{interpreted};
#return 0 if $event->{interpreted};
$self->check_trigger($nick, $user, $host, $channel, "PRIVMSG $msg");
return 0;
}