From b1173ca66a3a3dc3d1ae0b3f305e1b37e3d5c982 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 3 Mar 2014 15:07:17 +0100 Subject: Update nick timestamps in User::ChangeNick(), pass the new TS in a parameter --- src/users.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index a5737c9ce..cf1887ce9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -613,7 +613,7 @@ void User::InvalidateCache() cached_fullrealhost.clear(); } -bool User::ChangeNick(const std::string& newnick, bool force) +bool User::ChangeNick(const std::string& newnick, bool force, time_t newts) { if (quitting) { @@ -637,6 +637,7 @@ bool User::ChangeNick(const std::string& newnick, bool force) { // case change, don't need to check Q:lines and such // and, if it's identical including case, we can leave right now + // We also don't update the nick TS if it's a case change, either if (newnick == nick) return true; } @@ -710,6 +711,8 @@ bool User::ChangeNick(const std::string& newnick, bool force) return false; } } + + age = newts ? newts : ServerInstance->Time(); } if (this->registered == REG_ALL) -- cgit v1.3.1-10-gc9f91