3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-08 19:12:33 +01:00

Improve CHGHOST log message

This commit is contained in:
Pragmatic Software 2023-02-01 17:33:09 -08:00
parent d3c8c74a9d
commit 6dd390540a
2 changed files with 4 additions and 4 deletions

View File

@ -191,8 +191,6 @@ sub on_chghost {
my $account = $self->{pbot}->{messagehistory}->{database}->get_message_account($nick, $user, $host);
$self->{pbot}->{logger}->log("[CHGHOST] ($account) $nick!$user\@$host changed host to $nick!$newuser\@$newhost\n");
my $id = $self->{pbot}->{messagehistory}->{database}->get_message_account_id("$nick!$newuser\@$newhost");
if (defined $id) {
@ -200,9 +198,11 @@ sub on_chghost {
$self->{pbot}->{messagehistory}->{database}->link_alias($account, $id, LINK_STRONG);
}
} else {
$self->{pbot}->{messagehistory}->{database}->add_message_account("$nick!$newuser\@$newhost", $account, LINK_STRONG);
$id = $self->{pbot}->{messagehistory}->{database}->add_message_account("$nick!$newuser\@$newhost", $account, LINK_STRONG);
}
$self->{pbot}->{logger}->log("[CHGHOST] ($account) $nick!$user\@$host changed host to ($id) $nick!$newuser\@$newhost\n");
return 1;
}

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 => 4612,
BUILD_REVISION => 4613,
BUILD_DATE => "2023-02-01",
};