mirror of
https://github.com/anope/anope.git
synced 2026-07-03 00:23:12 +02:00
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
This commit is contained in:
@@ -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; \
|
||||
} \
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user