]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
...and remember the parameters ;)
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index d037b7101ccf401b88ec8b24b3678363055b6a34..ea01bb2c52eb7df44730f0e2d0e9d26346ea2380 100644 (file)
@@ -13,6 +13,7 @@
 
 /* $ModDesc: Provides a spanning tree server link protocol */
 
+#include "inspircd.h"
 #include "configreader.h"
 #include "users.h"
 #include "channels.h"
@@ -20,7 +21,6 @@
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
-#include "inspircd.h"
 #include "wildcard.h"
 #include "xline.h"
 #include "transport.h"
@@ -37,7 +37,7 @@
 /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h */
 
 ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
-       : Module::Module(Me), max_local(0), max_global(0)
+       : Module(Me), max_local(0), max_global(0)
 {
        ServerInstance->UseInterface("InspSocketHook");
        Utils = new SpanningTreeUtilities(Me, this);
@@ -907,8 +907,7 @@ void ModuleSpanningTree::OnUserJoin(userrec* user, chanrec* channel, bool &silen
                        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");
+                       params.push_back(channel->ChanModes(true));
                        Utils->DoOneToMany(ServerInstance->Config->ServerName,"FMODE",params);
                }
                else
@@ -1379,7 +1378,7 @@ class ModuleSpanningTreeFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleSpanningTreeFactory;
 }