From 29f296665d0625883d13d2c979cba702c952f5ec Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 6 Sep 2006 11:28:53 +0000 Subject: [PATCH] JOIN now has a TS parameter on it. The client protocol will ignore this when we pass it down to the command parser, it is for use if theres a minor desync and we send a PART for the last user at the same time the other side sends a JOIN for a new user, we can at least keep the TS in step. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5148 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index d980cba21..369aac19f 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -4450,10 +4450,19 @@ class ModuleSpanningTree : public Module // Only do this for local users if (IS_LOCAL(user)) { + char ts[24]; + snprintf(ts,24,"%lu",(unsigned long)channel->age); + std::deque params; params.clear(); params.push_back(channel->name); + /** XXX: The client protocol will IGNORE this parameter. + * We could make use of it if we wanted to keep the TS + * in step if somehow we lose it. + */ + params.push_back(ts); + if (channel->GetUserCounter() > 1) { // not the first in the channel @@ -4463,8 +4472,6 @@ class ModuleSpanningTree : public Module { // first in the channel, set up their permissions // and the channel TS with FJOIN. - char ts[24]; - snprintf(ts,24,"%lu",(unsigned long)channel->age); params.clear(); params.push_back(channel->name); params.push_back(ts); -- 2.39.5