aboutsummaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 021da42bc..3a36d82ad 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -467,13 +467,16 @@ void ModuleManager::LoadAll()
// Step 1: load all of the modules.
for (auto& [_, tag] : ServerInstance->Config->ConfTags("module"))
{
- std::string name = ExpandModName(tag->getString("name"));
- this->NewServices = &servicemap[name];
+ const std::string shortname = tag->getString("name");
+ if (shortname.empty())
+ continue; // Skip malformed module tags.
// Skip modules which are already loaded.
+ const std::string name = ExpandModName(shortname);
if (Modules.find(name) != Modules.end())
continue;
+ this->NewServices = &servicemap[name];
std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl;
if (!this->Load(name, true))
{