summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 09a788bd9..96ceee539 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -1095,6 +1095,8 @@ void ModuleSpanningTree::OnUserPostNick(userrec* user, const std::string &oldnic
{
std::deque<std::string> params;
params.push_back(user->nick);
+ user->age = ServerInstance->Time(true);
+ params.push_back(ConvToStr(user->age));
Utils->DoOneToMany(user->uuid,"NICK",params);
}
}
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 678e9d56f..aff737e5f 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -1489,8 +1489,11 @@ bool TreeSocket::ProcessLine(std::string &line)
}
if (who)
{
- if ((command == "NICK") && (params.size() > 0))
+ if ((command == "NICK") && (params.size() > 1))
{
+ /* Update timestamp on user when they change nicks */
+ who->age = atoi(params[1].c_str());
+
/* On nick messages, check that the nick doesnt
* already exist here. If it does, kill their copy,
* and our copy.