summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modmanager_dynamic.cpp23
-rw-r--r--src/modmanager_static.cpp4
-rw-r--r--src/modules.cpp23
3 files changed, 23 insertions, 27 deletions
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp
index 05c974063..c0114ed4e 100644
--- a/src/modmanager_dynamic.cpp
+++ b/src/modmanager_dynamic.cpp
@@ -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
diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp
index 534dcdec0..2bcd78e6c 100644
--- a/src/modmanager_static.cpp
+++ b/src/modmanager_static.cpp
@@ -214,8 +214,4 @@ void ModuleManager::LoadAll()
}
}
-void ModuleManager::UnloadAll()
-{
-}
-
#endif
diff --git a/src/modules.cpp b/src/modules.cpp
index bf5506d68..a111eaa92 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -395,6 +395,29 @@ void ModuleManager::DoSafeUnload(Module* mod)
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()
{
return LastModuleError;