*/
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;
}
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++)
*/
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 */