diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
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<std::string> 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<std::string> 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<std::string> params; + params.push_back(channel->name); + Utils->DoOneToMany(ServerInstance->Config->ServerName,"JOIN",params); + } } } |