X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodmanager_static.cpp;h=54813896e43bab568fe7f3d84dcf1448a2cf2ce1;hb=b57c0342cab22f9872dabaa8eff76ce5c8b9a890;hp=a8ba83274ea4fbe45e14a8999243d803e1bf5508;hpb=1858feabd342636df0b52780c978979b4e049fc3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp index a8ba83274..54813896e 100644 --- a/src/modmanager_static.cpp +++ b/src/modmanager_static.cpp @@ -93,10 +93,11 @@ bool ModuleManager::Load(const std::string& name, bool defer) mod = (*it->second->init)(); mod->ModuleSourceFile = name; mod->ModuleDLLManager = NULL; + mod->dying = false; Modules[name] = mod; if (defer) { - ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s", name.c_str()); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s", name.c_str()); return true; } else @@ -108,7 +109,7 @@ bool ModuleManager::Load(const std::string& name, bool defer) { if (mod) DoSafeUnload(mod); - ServerInstance->Logs->Log("MODULE", DEFAULT, "Unable to load " + name + ": " + modexcept.GetReason()); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Unable to load " + name + ": " + modexcept.GetReason()); return false; } FOREACH_MOD(I_OnLoadModule,OnLoadModule(mod)); @@ -125,7 +126,7 @@ bool ModuleManager::Load(const std::string& name, bool defer) if (prioritizationState == PRIO_STATE_LAST) break; if (tries == 19) - ServerInstance->Logs->Log("MODULE", DEFAULT, "Hook priority dependency loop detected while loading " + name); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Hook priority dependency loop detected while loading " + name); } ServerInstance->ISupport.Build(); @@ -183,6 +184,7 @@ void ModuleManager::LoadAll() { Load("cmd_all", true); Load("cmd_whowas.so", true); + Load("cmd_lusers.so", true); ConfigTagList tags = ServerInstance->Config->ConfTags("module"); for(ConfigIter i = tags.first; i != tags.second; ++i) @@ -193,7 +195,7 @@ void ModuleManager::LoadAll() if (!this->Load(name, true)) { - ServerInstance->Logs->Log("MODULE", DEFAULT, this->LastError()); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, this->LastError()); std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << this->LastError() << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } @@ -209,7 +211,7 @@ void ModuleManager::LoadAll() catch (CoreException& modexcept) { LastModuleError = "Unable to initialize " + mod->ModuleSourceFile + ": " + modexcept.GetReason(); - ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError); std::cout << std::endl << "[" << con_red << "*" << con_reset << "] " << LastModuleError << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } @@ -229,7 +231,7 @@ void ModuleManager::LoadAll() break; if (tries == 19) { - ServerInstance->Logs->Log("MODULE", DEFAULT, "Hook priority dependency loop detected"); + ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Hook priority dependency loop detected"); ServerInstance->Exit(EXIT_STATUS_MODULE); } }