X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodmanager_static.cpp;h=321bf520dd7833ff7f5448a65e893ed2b94792c3;hb=03a623a284b6c9f2f11f549c55333c45c4d91eab;hp=4c46241958d0da7f3d7630906a01978e615161c0;hpb=8790551dc182cd8804ee7d8ef89ccb31067cc2a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp index 4c4624195..321bf520d 100644 --- a/src/modmanager_static.cpp +++ b/src/modmanager_static.cpp @@ -58,7 +58,7 @@ class AllModule : public Module { Command* c = (*i)(this); cmds.push_back(c); - ServerInstance->AddCommand(c); + ServerInstance->Modules->AddService(*c); } } catch (...) @@ -97,11 +97,12 @@ bool ModuleManager::Load(const std::string& name, bool defer) Modules[name] = mod; if (defer) { - ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"New module introduced: %s", name.c_str()); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s", name.c_str()); return true; } 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 @@ -185,6 +186,7 @@ void ModuleManager::LoadAll() Load("cmd_all", true); Load("cmd_whowas.so", true); Load("cmd_lusers.so", true); + Load("cmd_privmsg.so", true); ConfigTagList tags = ServerInstance->Config->ConfTags("module"); for(ConfigIter i = tags.first; i != tags.second; ++i) @@ -206,6 +208,7 @@ void ModuleManager::LoadAll() Module* mod = i->second; try { + AttachAll(mod); mod->init(); } catch (CoreException& modexcept)