]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix some oversights
authorAttila Molnar <attilamolnar@hush.com>
Fri, 22 May 2015 16:49:20 +0000 (18:49 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Fri, 22 May 2015 16:49:20 +0000 (18:49 +0200)
src/modules.cpp
src/usermanager.cpp

index 334ac39f8f21b477d977f2ba90cc84e0d1690d06..9e653a4aba1460560f67a79dac1f2a54fb8a483c 100644 (file)
@@ -499,7 +499,7 @@ void ModuleManager::LoadAll()
        {
                ConfigTag* tag = i->second;
                std::string name = tag->getString("name");
-               this->NewServices = &servicemap[name];
+               this->NewServices = &servicemap[ExpandModName(name)];
                std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl;
 
                if (!this->Load(name, true))
index 4ebc3b5834be57142002bb52b983e6a579279b81..3e5fee3fcba4729088515b1642a4ec41a447be1f 100644 (file)
@@ -320,9 +320,11 @@ void UserManager::DoBackgroundUserStuff()
        /*
         * loop over all local users..
         */
-       for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ++i)
+       for (LocalList::iterator i = local_users.begin(); i != local_users.end(); )
        {
+               // It's possible that we quit the user below due to ping timeout etc. and QuitUser() removes it from the list
                LocalUser* curr = *i;
+               ++i;
 
                if (curr->CommandFloodPenalty || curr->eh.getSendQSize())
                {