From f70e044a60f3f6d826ca623c813513d94ceefe50 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 14 Oct 2014 02:33:13 +0000 Subject: [PATCH] Update latest hostmask last_seen timestamp when linking accounts --- PBot/MessageHistory_SQLite.pm | 2 ++ PBot/VERSION.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PBot/MessageHistory_SQLite.pm b/PBot/MessageHistory_SQLite.pm index c118f32a..0ce4ed2c 100644 --- a/PBot/MessageHistory_SQLite.pm +++ b/PBot/MessageHistory_SQLite.pm @@ -10,6 +10,7 @@ use strict; use DBI; use Carp qw(shortmess); +use Time::HiRes qw(gettimeofday); sub new { if(ref($_[1]) eq 'HASH') { @@ -322,6 +323,7 @@ sub get_message_account { $self->{pbot}->{logger}->log("message-history: [get-account] $nick!$user\@$host linked to $rows->[0]->{hostmask} with id $rows->[0]->{id}\n"); $self->add_message_account("$nick!$user\@$host", $rows->[0]->{id}); $self->devalidate_all_channels($rows->[0]->{id}); + $self->update_hostmask_data("$nick!$user\@$host", { last_seen => scalar gettimeofday }); my @nickserv_accounts = $self->get_nickserv_accounts($rows->[0]->{id}); foreach my $nickserv_account (@nickserv_accounts) { $self->{pbot}->{logger}->log("$nick!$user\@$host [$rows->[0]->{id}] seen with nickserv account [$nickserv_account]\n"); diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 1824213c..6b236af7 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 793, + BUILD_REVISION => 794, BUILD_DATE => "2014-10-13", };