summaryrefslogtreecommitdiff
path: root/src/modmanager_dynamic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modmanager_dynamic.cpp')
-rw-r--r--src/modmanager_dynamic.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp
index 49c91a7d8..adff8630d 100644
--- a/src/modmanager_dynamic.cpp
+++ b/src/modmanager_dynamic.cpp
@@ -44,14 +44,14 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
if (!ServerConfig::FileExists(modfile))
{
LastModuleError = "Module file could not be found: " + filename;
- ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError);
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError);
return false;
}
if (Modules.find(filename) != Modules.end())
{
LastModuleError = "Module " + filename + " is already loaded, cannot load a module twice!";
- ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError);
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError);
return false;
}
@@ -70,7 +70,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
std::string version = newhandle->GetVersion();
if (defer)
{
- ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s (Module version %s)",
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"New module introduced: %s (Module version %s)",
filename.c_str(), version.c_str());
}
else
@@ -78,14 +78,14 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
newmod->init();
Version v = newmod->GetVersion();
- ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s (Module version %s)%s",
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"New module introduced: %s (Module version %s)%s",
filename.c_str(), version.c_str(), (!(v.Flags & VF_VENDOR) ? " [3rd Party]" : " [Vendor]"));
}
}
else
{
LastModuleError = "Unable to load " + filename + ": " + newhandle->LastError();
- ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError);
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError);
delete newhandle;
return false;
}
@@ -101,7 +101,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
else
delete newhandle;
LastModuleError = "Unable to load " + filename + ": " + modexcept.GetReason();
- ServerInstance->Logs->Log("MODULE", DEFAULT, LastModuleError);
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError);
return false;
}
@@ -123,7 +123,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
if (prioritizationState == PRIO_STATE_LAST)
break;
if (tries == 19)
- ServerInstance->Logs->Log("MODULE", DEFAULT, "Hook priority dependency loop detected while loading " + filename);
+ ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Hook priority dependency loop detected while loading " + filename);
}
ServerInstance->ISupport.Build();
@@ -203,7 +203,7 @@ void ModuleManager::LoadAll()
if (!Load(entry->d_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);
}
@@ -222,7 +222,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);
}
@@ -233,13 +233,13 @@ void ModuleManager::LoadAll()
Module* mod = i->second;
try
{
- ServerInstance->Logs->Log("MODULE", DEBUG, "Initializing %s", i->first.c_str());
+ ServerInstance->Logs->Log("MODULE", LOG_DEBUG, "Initializing %s", i->first.c_str());
mod->init();
}
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);
}
@@ -259,7 +259,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);
}
}