diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-03-03 15:07:17 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-03-03 15:07:17 +0100 |
commit | b1173ca66a3a3dc3d1ae0b3f305e1b37e3d5c982 (patch) | |
tree | 66fd0557af47b1e6282f942830766f6a96ec87b6 /src/users.cpp | |
parent | a5ca8b892c384d5926bf03353ef878023f0f573d (diff) |
Update nick timestamps in User::ChangeNick(), pass the new TS in a parameter
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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) |