aboutsummaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-11-20 12:49:02 +0000
committerGravatar Sadie Powell2020-11-20 15:45:17 +0000
commit54e0cade5c9ec904bbdc755d8031ed8e22e994f6 (patch)
tree312e579f280e7db2269c3fe754a6c4f423713c0e /src/modules.cpp
parentConvert IRCv3::Replies::Reply#Send[IfCap] to variadic functions. (diff)
parentRelease v3.8.1. (diff)
Merge tag 'v3.8.1' into master.
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))
{