X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodmanager_dynamic.cpp;h=750a1c448002c8cc17b416cdf7618b8e8160ab22;hb=67de413cad88194972d55a8ff88464370890c5a9;hp=b9c046a8e78e67959669147072881fc39a455a42;hpb=d9d99cd02dadf34bfcc220734ba0c422f0acb3e6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index b9c046a8e..750a1c448 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -37,7 +37,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer) if (filename.find('/') != std::string::npos) return false; - const std::string moduleFile = ServerInstance->Config->ModPath + "/" + filename; + const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename); if (!ServerConfig::FileExists(moduleFile.c_str())) { @@ -74,6 +74,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer) } else { + AttachAll(newmod); newmod->init(); Version v = newmod->GetVersion(); @@ -108,7 +109,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer) if (defer) return true; - FOREACH_MOD(I_OnLoadModule,OnLoadModule(newmod)); + FOREACH_MOD(OnLoadModule, (newmod)); /* 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 @@ -189,7 +190,7 @@ void ModuleManager::LoadAll() std::cout << std::endl << "Loading core commands"; fflush(stdout); - DIR* library = opendir(ServerInstance->Config->ModPath.c_str()); + DIR* library = opendir(ServerInstance->Config->Paths.Module.c_str()); if (library) { dirent* entry = NULL; @@ -233,6 +234,7 @@ void ModuleManager::LoadAll() try { ServerInstance->Logs->Log("MODULE", LOG_DEBUG, "Initializing %s", i->first.c_str()); + AttachAll(mod); mod->init(); } catch (CoreException& modexcept)