From dec9eaa58841dea08455c0e977fd7c059aa13599 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Dec 2006 13:15:43 +0000 Subject: Dont use FJOIN to join users to channels outside the burst (revert to earlier betas behaviour) which should prevent some spurious deops during normal operation git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6032 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index f423f7617..f6bd0e736 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -4994,25 +4994,28 @@ class ModuleSpanningTree : public Module // Only do this for local users if (IS_LOCAL(user)) { - std::deque params; - params.clear(); - params.push_back(channel->name); - // set up their permissions and the channel TS with FJOIN. - // All users are FJOINed now, because a module may specify - // new joining permissions for the user. - params.clear(); - params.push_back(channel->name); - params.push_back(ConvToStr(channel->age)); - params.push_back(std::string(channel->GetAllPrefixChars(user))+","+std::string(user->nick)); - Utils->DoOneToMany(ServerInstance->Config->ServerName,"FJOIN",params); if (channel->GetUserCounter() == 1) { + std::deque params; + // set up their permissions and the channel TS with FJOIN. + // All users are FJOINed now, because a module may specify + // new joining permissions for the user. + params.push_back(channel->name); + params.push_back(ConvToStr(channel->age)); + params.push_back(std::string(channel->GetAllPrefixChars(user))+","+std::string(user->nick)); + Utils->DoOneToMany(ServerInstance->Config->ServerName,"FJOIN",params); /* First user in, sync the modes for the channel */ params.pop_back(); /* This is safe, all inspircd servers default to +nt */ params.push_back("+nt"); Utils->DoOneToMany(ServerInstance->Config->ServerName,"FMODE",params); } + else + { + std::deque params; + params.push_back(channel->name); + Utils->DoOneToMany(ServerInstance->Config->ServerName,"JOIN",params); + } } } -- cgit v1.2.3