summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-28 13:43:45 -0400
committerAdam <Adam@anope.org>2013-05-28 13:43:45 -0400
commitf6e2ebe14581ce1ac38e3132846f79616f2a6535 (patch)
tree1a9cb5f15943e001f880aa9258618b7bb724d06b
parent37b3535543b81c3d75c8f62b83d422f0d2fbced0 (diff)
Fixup last commit. We have events in log's destructor so we cant log messages from it, and this check in modulemanager is bogus/has a typo
-rw-r--r--include/modules.h2
-rw-r--r--src/modulemanager.cpp6
2 files changed, 1 insertions, 7 deletions
diff --git a/include/modules.h b/include/modules.h
index 5463c2ad6..b645bb7f3 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -75,7 +75,6 @@ if (true) \
} \
catch (const NotImplementedException &) \
{ \
- Log(LOG_DEBUG_2) << "Detaching event " << #ename << " from " << (*_i)->name; \
_i = _modules.erase(_i); \
continue; \
} \
@@ -115,7 +114,6 @@ if (true) \
} \
catch (const NotImplementedException &) \
{ \
- Log(LOG_DEBUG_2) << "Detaching event " << #ename << " from " << (*_i)->name; \
_i = _modules.erase(_i); \
continue; \
} \
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index a3719b412..7f69c2edb 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -264,11 +264,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
/* Attach module to all events */
for (std::map<Anope::string, std::vector<Module *> >::iterator it = EventHandlers.begin(); it != EventHandlers.end(); ++it)
- /* Modules can already be attached here if loading them causes a new event to trigged, which initializes this vector
- * to all known modules, which includes this one.
- */
- if (std::find(it->second.begin(), it->second.end(), m) != it->second.end())
- it->second.push_back(m);
+ it->second.push_back(m);
FOREACH_MOD(OnModuleLoad, (u, m));