summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-18 16:52:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-18 16:52:56 +0000
commit0f6de0b18372a76ebb5d6c4ba3dc9a7a7e0a7297 (patch)
treeb16e5eb6b4d97bca39472ffea21d412c13ad71e2 /src/modules/m_spanningtree
parent3699bdaee53896b491256d3aa694ef20cbdb0743 (diff)
set the TS of a channel in JoinUser, not after the entire FJOIN, this is safer and may fix the odd desync here and there
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6690 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp18
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp2
2 files changed, 5 insertions, 15 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index f0fd0e1ef..008f0c98a 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -756,7 +756,10 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
/* Finally, we can actually place the user into the channel.
* We're sure its right. Final answer, phone a friend.
*/
- chanrec::JoinUser(this->Instance, who, channel.c_str(), true, "");
+ if (created)
+ chanrec::JoinUser(this->Instance, who, channel.c_str(), true, "", TS);
+ else
+ chanrec::JoinUser(this->Instance, who, channel.c_str(), true, "");
/* Have we already queued up MAXMODES modes with parameters
* (+qaohv) ready to be sent to the server?
*/
@@ -838,19 +841,6 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
for (unsigned int f = 2; f < modectr; f++)
free(mode_users[f]);
}
- /* if we newly created the channel, set it's TS properly. */
- if (created)
- {
- /* find created channel .. */
- chan = this->Instance->FindChan(channel);
- if (chan)
- /* w00t said this shouldnt be needed but it is.
- * This isnt strictly true, as chan can be NULL
- * if a nick collision has occured and therefore
- * the channel was never created.
- */
- chan->age = TS;
- }
/* All done. That wasnt so bad was it, you can wipe
* the sweat from your forehead now. :-)
*/
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index e4d53c8ef..72c439ebe 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -335,7 +335,7 @@ bool TreeSocket::ServiceJoin(const std::string &prefix, std::deque<std::string>
{
/* only join if it's local, otherwise just pass it on! */
if (IS_LOCAL(u))
- chanrec::JoinUser(this->Instance, u, params[1].c_str(), false);
+ chanrec::JoinUser(this->Instance, u, params[1].c_str(), false, "", Instance->Time());
Utils->DoOneToAllButSender(prefix,"SVSJOIN",params,prefix);
}
return true;