From 65df386d66550f5b30322ae2e8985169e3721aef Mon Sep 17 00:00:00 2001 From: IgnacioFDM Date: Fri, 9 Mar 2018 15:32:30 -0300 Subject: [PATCH] Fix OnPluginsUnloaded not being called for reloadable modules. (#485) Modules are loaded before plugins, and can hook OnPluginsLoaded. Therefore, they should be unloaded AFTER plugins, and be able to hook OnPluginsUnloaded. This was not the case for reloadable modules. This affects nvault module, whose OnPluginsUnloaded function wasn't being called. --- amxmodx/meta_api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index abe289e2..32c81cfd 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -751,8 +751,6 @@ void C_ServerDeactivate_Post() modules_callPluginsUnloading(); - detachReloadModules(); - CoreCfg.Clear(); g_auth.clear(); @@ -776,6 +774,8 @@ void C_ServerDeactivate_Post() ClearPluginLibraries(); modules_callPluginsUnloaded(); + detachReloadModules(); + ClearMessages(); // Flush the dynamic admins list