summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-05-22 18:49:20 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-05-22 18:49:20 +0200
commitdf9bd50866a1ee95db78b88090aae74e245ad469 (patch)
tree7a935c76f218d5b1fd46b130febe0990760e92f8
parentf449c6b2f06624b3af524c06179a0be591c496ab (diff)
Fix some oversights
-rw-r--r--src/modules.cpp2
-rw-r--r--src/usermanager.cpp4
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())
{