3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 03:02:47 +01:00

Fix QUIT log message

This commit is contained in:
Pragmatic Software 2023-02-01 17:47:25 -08:00
parent 6dd390540a
commit 7bbd5d8097
3 changed files with 5 additions and 3 deletions

View File

@ -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");
}
}

View File

@ -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 (@_) });

View File

@ -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",
};