summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 3e7ae9cdf..c3315490e 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -551,14 +551,17 @@ void ModuleManager::LoadAll()
for(int count = 0; count < Instance->Config->ConfValueEnum(Instance->Config->config_data, "module"); count++)
{
- Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
- printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
-
- if (!this->Load(configToken))
+ if (!this->Find(configToken))
{
- Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
- printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
- Instance->Exit(EXIT_STATUS_MODULE);
+ Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
+ printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
+
+ if (!this->Load(configToken))
+ {
+ Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
+ printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
+ Instance->Exit(EXIT_STATUS_MODULE);
+ }
}
}
}