From df9bd50866a1ee95db78b88090aae74e245ad469 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 22 May 2015 18:49:20 +0200 Subject: [PATCH] Fix some oversights --- src/modules.cpp | 2 +- src/usermanager.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules.cpp b/src/modules.cpp index 334ac39f8..9e653a4ab 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -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)) diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 4ebc3b583..3e5fee3fc 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -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()) { -- 2.39.2