From c930256639e1bab55cb3a9ae2965647f2f6b9ec2 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Nov 2007 20:19:25 +0000 Subject: [PATCH] Fix the two FIXMEs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8521 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 7 +------ src/inspircd.cpp | 18 +++--------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/configreader.cpp b/src/configreader.cpp index e7eb84ff8..cbf254b32 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -664,15 +664,10 @@ bool DoneULine(ServerConfig*, const char*) */ bool InitModule(ServerConfig* conf, const char*) { - old_module_names.clear(); + old_module_names = conf->GetInstance()->Modules->GetAllModuleNames(0); new_module_names.clear(); added_modules.clear(); removed_modules.clear(); - /** FIXME **/ - /*for (std::vector::iterator t = conf->module_names.begin(); t != conf->module_names.end(); t++) - { - old_module_names.push_back(*t); - }*/ return true; } diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e5e9ad5b3..5b21f197c 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -70,9 +70,6 @@ const char* ExitCodes[] = void InspIRCd::Cleanup() { - std::vector mymodnames; - int MyModCount = this->Modules->GetCount(); - if (Config) { for (unsigned int i = 0; i < Config->ports.size(); i++) @@ -97,21 +94,12 @@ void InspIRCd::Cleanup() */ for (int tries = 0; tries < 3; tries++) { - MyModCount = this->Modules->GetCount(); - mymodnames.clear(); - - if (MyModCount) + std::vector module_names = Modules->GetAllModuleNames(0); + for (std::vector::iterator k = module_names.begin(); k != module_names.end(); ++k) { /* Unload all modules, so they get a chance to clean up their listeners */ - /*XXX FIXME - * for (int j = 0; j <= MyModCount; j++) - mymodnames.push_back(Config->module_names[j]); - - for (int k = 0; k <= MyModCount; k++) - this->Modules->Unload(mymodnames[k].c_str()); - */ + this->Modules->Unload(k->c_str()); } - } /* Close logging */ -- 2.39.5