X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=77e4142b3b9b569a33e11fc927083749ef101120;hb=d71c37e05911d87830987a09128a178c3e402bb4;hp=27431e3fb5a7100d844bb8520feccdfa5c2a8259;hpb=e81dcaec7f8d3032b1931c8aa24cc945dac4c3a3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index 27431e3fb..77e4142b3 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -479,13 +479,17 @@ void ModuleManager::LoadAll() for (ConfigIter i = tags.first; i != tags.second; ++i) { ConfigTag* tag = i->second; - 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)) {