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:
parent
6dd390540a
commit
7bbd5d8097
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 (@_) });
|
||||
|
@ -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",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user