summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-05-12 23:42:20 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-05-12 23:42:20 +0200
commit00c0409dd47fe985abf0f8d32cd66c8ef81fe708 (patch)
tree20700a4970690c355d8eae364bbd2e12bc131db8
parentf757c2d75bc284211f3b53b2819b88becfd8632f (diff)
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
-rw-r--r--include/modules.h1
-rw-r--r--src/coremods/core_info/cmd_modules.cpp4
-rw-r--r--src/modules.cpp6
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<std::string>& 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;