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()))
{
}
else
{
+ AttachAll(newmod);
newmod->init();
Version v = newmod->GetVersion();
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
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;
try
{
ServerInstance->Logs->Log("MODULE", LOG_DEBUG, "Initializing %s", i->first.c_str());
+ AttachAll(mod);
mod->init();
}
catch (CoreException& modexcept)