3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-11 12:32:37 +01:00

Add $event->{interpreted} example to _Example plugin

This commit is contained in:
Pragmatic Software 2015-09-08 01:37:59 -07:00
parent e5097eee69
commit 391cd91191

View File

@ -34,6 +34,11 @@ 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);
if ($event->{interpreted}) {
$self->{pbot}->{logger}->log("Message was already handled by the interpreter.\n");
return 0;
}
$self->{pbot}->{logger}->log("_Example plugin: got message from $nick!$user\@$host: $msg\n");
return 0;