summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/nick.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-03-03 15:07:17 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-03-03 15:07:17 +0100
commitb1173ca66a3a3dc3d1ae0b3f305e1b37e3d5c982 (patch)
tree66fd0557af47b1e6282f942830766f6a96ec87b6 /src/modules/m_spanningtree/nick.cpp
parenta5ca8b892c384d5926bf03353ef878023f0f573d (diff)
Update nick timestamps in User::ChangeNick(), pass the new TS in a parameter
Diffstat (limited to 'src/modules/m_spanningtree/nick.cpp')
-rw-r--r--src/modules/m_spanningtree/nick.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/nick.cpp b/src/modules/m_spanningtree/nick.cpp
index eb6c9396f..49ce9a767 100644
--- a/src/modules/m_spanningtree/nick.cpp
+++ b/src/modules/m_spanningtree/nick.cpp
@@ -36,7 +36,7 @@ CmdResult CommandNick::HandleRemote(RemoteUser* user, std::vector<std::string>&
return CMD_INVALID;
/* Update timestamp on user when they change nicks */
- user->age = ConvToInt(params[1]);
+ const time_t newts = ConvToInt(params[1]);
/*
* On nick messages, check that the nick doesn't already exist here.
@@ -46,7 +46,7 @@ CmdResult CommandNick::HandleRemote(RemoteUser* user, std::vector<std::string>&
if ((x) && (x != user))
{
/* x is local, who is remote */
- int collideret = Utils->DoCollision(x, TreeServer::Get(user), user->age, user->ident, user->GetIPString(), user->uuid);
+ int collideret = Utils->DoCollision(x, TreeServer::Get(user), newts, user->ident, user->GetIPString(), user->uuid);
if (collideret != 1)
{
/*
@@ -57,6 +57,6 @@ CmdResult CommandNick::HandleRemote(RemoteUser* user, std::vector<std::string>&
return CMD_FAILURE;
}
}
- user->ForceNickChange(params[0]);
+ user->ForceNickChange(params[0], newts);
return CMD_SUCCESS;
}