mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Move ModuleManager::UnloadAll out of modmanager_dynamic
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12649 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
a9754ce49b
commit
406010998e
@ -282,27 +282,4 @@ void ModuleManager::LoadAll()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModuleManager::UnloadAll()
|
|
||||||
{
|
|
||||||
/* We do this more than once, so that any service providers get a
|
|
||||||
* chance to be unhooked by the modules using them, but then get
|
|
||||||
* a chance to be removed themsleves.
|
|
||||||
*
|
|
||||||
* Note: this deliberately does NOT delete the DLLManager objects
|
|
||||||
*/
|
|
||||||
for (int tries = 0; tries < 4; tries++)
|
|
||||||
{
|
|
||||||
std::map<std::string, Module*>::iterator i = Modules.begin();
|
|
||||||
while (i != Modules.end())
|
|
||||||
{
|
|
||||||
std::map<std::string, Module*>::iterator me = i++;
|
|
||||||
if (CanUnload(me->second))
|
|
||||||
{
|
|
||||||
DoSafeUnload(me->second);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ServerInstance->GlobalCulls.Apply();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -214,8 +214,4 @@ void ModuleManager::LoadAll()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModuleManager::UnloadAll()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -395,6 +395,29 @@ void ModuleManager::DoSafeUnload(Module* mod)
|
|||||||
ServerInstance->BuildISupport();
|
ServerInstance->BuildISupport();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ModuleManager::UnloadAll()
|
||||||
|
{
|
||||||
|
/* We do this more than once, so that any service providers get a
|
||||||
|
* chance to be unhooked by the modules using them, but then get
|
||||||
|
* a chance to be removed themsleves.
|
||||||
|
*
|
||||||
|
* Note: this deliberately does NOT delete the DLLManager objects
|
||||||
|
*/
|
||||||
|
for (int tries = 0; tries < 4; tries++)
|
||||||
|
{
|
||||||
|
std::map<std::string, Module*>::iterator i = Modules.begin();
|
||||||
|
while (i != Modules.end())
|
||||||
|
{
|
||||||
|
std::map<std::string, Module*>::iterator me = i++;
|
||||||
|
if (CanUnload(me->second))
|
||||||
|
{
|
||||||
|
DoSafeUnload(me->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ServerInstance->GlobalCulls.Apply();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string& ModuleManager::LastError()
|
std::string& ModuleManager::LastError()
|
||||||
{
|
{
|
||||||
return LastModuleError;
|
return LastModuleError;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user