]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Only assign NewServices once the duplicate check is done.
authorSadie Powell <sadie@witchery.services>
Tue, 3 Nov 2020 21:01:31 +0000 (21:01 +0000)
committerSadie Powell <sadie@witchery.services>
Tue, 3 Nov 2020 21:01:31 +0000 (21:01 +0000)
src/modules.cpp

index 27431e3fb5a7100d844bb8520feccdfa5c2a8259..17804a48edc93e7cc21a76761c64bb4044af43b4 100644 (file)
@@ -480,12 +480,12 @@ void ModuleManager::LoadAll()
        {
                ConfigTag* tag = i->second;
                std::string name = ExpandModName(tag->getString("name"));
-               this->NewServices = &servicemap[name];
 
                // Skip modules which are already loaded.
                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))
                {