]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modmanager_static.cpp
m_spanningtree Remove SpanningTreeUtilities* fields and parameters
[user/henk/code/inspircd.git] / src / modmanager_static.cpp
index c82ee3f7ae3e901f38e7c01249d695741bc7f666..321bf520dd7833ff7f5448a65e893ed2b94792c3 100644 (file)
@@ -58,7 +58,7 @@ class AllModule : public Module
                        {
                                Command* c = (*i)(this);
                                cmds.push_back(c);
-                               ServerInstance->AddCommand(c);
+                               ServerInstance->Modules->AddService(*c);
                        }
                }
                catch (...)
@@ -102,6 +102,7 @@ bool ModuleManager::Load(const std::string& name, bool defer)
                }
                else
                {
+                       AttachAll(mod);
                        mod->init();
                }
        }
@@ -112,7 +113,7 @@ bool ModuleManager::Load(const std::string& name, bool defer)
                ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Unable to load " + name + ": " + modexcept.GetReason());
                return false;
        }
-       FOREACH_MOD(I_OnLoadModule,OnLoadModule(mod));
+       FOREACH_MOD(OnLoadModule, (mod));
        /* We give every module a chance to re-prioritize when we introduce a new one,
         * not just the one thats loading, as the new module could affect the preference
         * of others
@@ -207,6 +208,7 @@ void ModuleManager::LoadAll()
                Module* mod = i->second;
                try
                {
+                       AttachAll(mod);
                        mod->init();
                }
                catch (CoreException& modexcept)