From cd969f47e26cb9ed2e3e6a7ded85105abb7b1ce6 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Dec 2005 13:54:03 +0000 Subject: Fixed ops-on-join in anope git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2139 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 9992c02d4..f04f79a65 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1709,7 +1709,21 @@ class ModuleSpanningTree : public Module // if the channel has a key, force the join by emulating the key. params.push_back(channel->key); } - DoOneToMany(user->nick,"JOIN",params); + if (channel->GetUserCounter() > 1) + { + // not the first in the channel + DoOneToMany(user->nick,"JOIN",params); + } + else + { + // first in the channel, set up their permissions + // and the channel TS with FJOIN. + params.clear(); + params.push_back(channel->name); + params.push_back(channel->age); + params.push_back("@"+std::string(user->nick)); + DoOneToMany(Srv->GetServerName(),"FJOIN",params); + } } } -- cgit v1.2.3