diff options
author | Adam <Adam@anope.org> | 2011-05-21 04:57:27 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-05-21 04:57:27 -0400 |
commit | 115f94bfc23c481eab50298895f76bd494179cd8 (patch) | |
tree | eeda28c466e9f2f532b2dee75cb817eba9066357 /src/modulemanager.cpp | |
parent | 7e5727288d9b2da5b53476b91f8cb9fe96e14d53 (diff) |
Made Anope able to process normally when disconnected from the uplink and not sleep(), enable usage of non-blocking connect() and default all sockets to non blocking mode. Some cleanup to m_ssl and some cleanup to main.cpp.
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r-- | src/modulemanager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index e2f837f0f..1c4e07eef 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -308,6 +308,8 @@ ModuleReturn ModuleManager::DeleteModule(Module *m) ano_module_t handle = m->handle; Anope::string filename = m->filename; + Log(LOG_DEBUG) << "Unloading module " << m->name; + ano_modclearerr(); void (*destroy_func)(Module *m) = function_cast<void (*)(Module *)>(dlsym(m->handle, "AnopeFini")); const char *err = ano_moderr(); @@ -471,14 +473,14 @@ void ModuleManager::ClearCallBacks(Module *m) delete m->CallBacks.front(); } -/** Unloading all modules, NEVER call this when Anope isn't shutting down. - * Ever. +/** Unloading all modules except the protocol module. */ void ModuleManager::UnloadAll() { std::vector<Anope::string> modules[MT_END]; for (std::list<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it) - modules[(*it)->type].push_back((*it)->name); + if ((*it)->type != PROTOCOL) + modules[(*it)->type].push_back((*it)->name); for (size_t i = MT_BEGIN + 1; i != MT_END; ++i) for (unsigned j = 0; j < modules[i].size(); ++j) |