diff --git a/lib/PBot/Core/AntiFlood.pm b/lib/PBot/Core/AntiFlood.pm index 9b87c77f..73513ca3 100644 --- a/lib/PBot/Core/AntiFlood.pm +++ b/lib/PBot/Core/AntiFlood.pm @@ -112,6 +112,7 @@ sub check_flood { my $oldnick = $nick; my $account; + # handle old-style pseudo-QUIT for changing-host if CHGHOST is not available if ($mode == MSG_JOIN and exists $self->{changinghost}->{$nick}) { $self->{pbot}->{logger}->log("Finalizing host change for $nick.\n"); @@ -152,9 +153,9 @@ sub check_flood { if ($mode == MSG_CHAT) { $self->{pbot}->{logger}->log("[MSG] $channel ($account) $mask => $text\n"); } else { - my $from = $channel eq lc $mask ? "QUIT" : $channel; + my $from = $channel eq lc $mask ? undef : $channel; my ($type) = $text =~ /^(\w+) /; - $self->{pbot}->{logger}->log("[$type] $from ($account) $mask => $text\n"); + $self->{pbot}->{logger}->log("[$type] " . (defined $from ? "$from " : '') . "($account) $mask => $text\n"); } } diff --git a/lib/PBot/Core/Handlers/Channel.pm b/lib/PBot/Core/Handlers/Channel.pm index 4bb497b6..7afbfb2a 100644 --- a/lib/PBot/Core/Handlers/Channel.pm +++ b/lib/PBot/Core/Handlers/Channel.pm @@ -23,6 +23,7 @@ sub initialize { $self->{pbot}->{event_dispatcher}->register_handler('irc.mode', sub { $self->on_mode (@_) }); $self->{pbot}->{event_dispatcher}->register_handler('irc.join', sub { $self->on_join (@_) }); $self->{pbot}->{event_dispatcher}->register_handler('irc.part', sub { $self->on_departure (@_) }); + $self->{pbot}->{event_dispatcher}->register_handler('irc.quit', sub { $self->on_departure (@_) }); $self->{pbot}->{event_dispatcher}->register_handler('irc.kick', sub { $self->on_kick (@_) }); $self->{pbot}->{event_dispatcher}->register_handler('irc.invite', sub { $self->on_invite (@_) }); $self->{pbot}->{event_dispatcher}->register_handler('irc.channelmodeis', sub { $self->on_channelmodeis (@_) }); diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index acfd12a8..8bf732c6 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4613, + BUILD_REVISION => 4614, BUILD_DATE => "2023-02-01", };