From cdb84a86020f05b2ee9f51a3e6a5b5aaa11d6183 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 22 May 2015 04:24:38 -0700 Subject: [PATCH] Link nick-changes to original nick's account instead of new nick's --- PBot/IRCHandlers.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PBot/IRCHandlers.pm b/PBot/IRCHandlers.pm index 8af2eede..5ca0c638 100644 --- a/PBot/IRCHandlers.pm +++ b/PBot/IRCHandlers.pm @@ -319,7 +319,7 @@ sub on_nickchange { $self->{pbot}->{messagehistory}->add_message($message_account, "$nick!$user\@$host", $channel, "NICKCHANGE $newnick", $self->{pbot}->{messagehistory}->{MSG_NICKCHANGE}); } - my $newnick_account = $self->{pbot}->{messagehistory}->{database}->get_message_account($newnick, $user, $host); + my $newnick_account = $self->{pbot}->{messagehistory}->{database}->get_message_account($newnick, $user, $host, $nick); $self->{pbot}->{messagehistory}->{database}->devalidate_all_channels($newnick_account, $self->{pbot}->{antiflood}->{NEEDS_CHECKBAN}); $self->{pbot}->{messagehistory}->{database}->update_hostmask_data($newnick_account, { last_seen => scalar gettimeofday }); @@ -327,6 +327,7 @@ sub on_nickchange { $self->{pbot}->{registry}->get_value('antiflood', 'nick_flood_threshold'), $self->{pbot}->{registry}->get_value('antiflood', 'nick_flood_time_threshold'), $self->{pbot}->{messagehistory}->{MSG_NICKCHANGE}); + return 0; }