]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fixed ops-on-join in anope
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 4 Dec 2005 13:54:03 +0000 (13:54 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 4 Dec 2005 13:54:03 +0000 (13:54 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2139 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index 9992c02d4d93e93489f431bdbceacbeddce30d0b..f04f79a65a7fefea61fbfdd9731831a850cc8357 100644 (file)
@@ -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);
+                       }
                }
        }