]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix the two FIXMEs
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 4 Nov 2007 20:19:25 +0000 (20:19 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 4 Nov 2007 20:19:25 +0000 (20:19 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8521 e03df62e-2008-0410-955e-edbf42e46eb7

src/configreader.cpp
src/inspircd.cpp

index e7eb84ff8dabc3bf5a081e8e593da2338bba5e2d..cbf254b322f2245cc30ec2acc747bbe020cfc805 100644 (file)
@@ -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<std::string>::iterator t = conf->module_names.begin(); t != conf->module_names.end(); t++)
-       {
-               old_module_names.push_back(*t);
-       }*/
        return true;
 }
 
index e5e9ad5b3c66788e5da55fd11190194f473b182a..5b21f197c1649aa233a1fd11ef59da3f025c8691 100644 (file)
@@ -70,9 +70,6 @@ const char* ExitCodes[] =
 
 void InspIRCd::Cleanup()
 {
-       std::vector<std::string> 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<std::string> module_names = Modules->GetAllModuleNames(0);
+               for (std::vector<std::string>::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 */