]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Fix some confusing logic in sanick.
[user/henk/code/inspircd.git] / src / modules.cpp
index 27431e3fb5a7100d844bb8520feccdfa5c2a8259..77e4142b3b9b569a33e11fc927083749ef101120 100644 (file)
@@ -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))
                {