From 00c0409dd47fe985abf0f8d32cd66c8ef81fe708 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 12 May 2015 23:42:20 +0200 Subject: Remove support for non-unloadable (VF_STATIC) modules No module we ship uses this flag and new modules should not use it either to make hotfixing possible --- include/modules.h | 1 - src/coremods/core_info/cmd_modules.cpp | 4 ++-- src/modules.cpp | 6 ------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/modules.h b/include/modules.h index 1fd1c7e00..3cf780284 100644 --- a/include/modules.h +++ b/include/modules.h @@ -39,7 +39,6 @@ */ enum ModuleFlags { VF_NONE = 0, // module is not special at all - VF_STATIC = 1, // module is static, cannot be /unloadmodule'd VF_VENDOR = 2, // module is a vendor module (came in the original tarball, not 3rd party) VF_COMMON = 4, // module needs to be common on all servers in a network to link VF_OPTCOMMON = 8, // module should be common on all servers for unsurprising behavior diff --git a/src/coremods/core_info/cmd_modules.cpp b/src/coremods/core_info/cmd_modules.cpp index 7f31beaf8..0a1420e13 100644 --- a/src/coremods/core_info/cmd_modules.cpp +++ b/src/coremods/core_info/cmd_modules.cpp @@ -58,9 +58,9 @@ CmdResult CommandModules::Handle (const std::vector& parameters, Us if (IS_LOCAL(user) && user->HasPrivPermission("servers/auspex")) { - std::string flags("SvcC"); + std::string flags("vcC"); int pos = 0; - for (int mult = 1; mult <= VF_OPTCOMMON; mult *= 2, ++pos) + for (int mult = 2; mult <= VF_OPTCOMMON; mult *= 2, ++pos) if (!(V.Flags & mult)) flags[pos] = '-'; diff --git a/src/modules.cpp b/src/modules.cpp index a7acb24d0..b8982579c 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -337,12 +337,6 @@ bool ModuleManager::CanUnload(Module* mod) ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError); return false; } - if (mod->GetVersion().Flags & VF_STATIC) - { - LastModuleError = "Module " + mod->ModuleSourceFile + " not unloadable (marked static)"; - ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, LastModuleError); - return false; - } mod->dying = true; return true; -- cgit v1.2.3