From 279ed08de17d05cf7825225379398508facbec60 Mon Sep 17 00:00:00 2001 From: E. Allen Soard Date: Fri, 6 May 2011 21:22:06 -0700 Subject: Incremental patch to add config options to enable/disable the prim limits module to OpenSim.ini. EnforcePrimLimits is set to false by default to emulate the current behavior. --- .../PrimLimitsModule/PrimLimitsModule.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/PrimLimitsModule') diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index 0aee191..dd02bc7 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs @@ -56,13 +56,23 @@ namespace OpenSim.Region.OptionalModules { protected IDialogModule m_dialogModule; private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private bool m_enabled; + public string Name { get { return "Prim Limits Module"; } } public Type ReplaceableInterface { get { return null; } } public void Initialise(IConfigSource source) { + IConfig moduleConfig = source.Configs["PrimLimitsModule"]; + if (moduleConfig != null) + { + this.m_enabled = moduleConfig.GetBoolean("EnforcePrimLimits", false); + } + else + { + this.m_enabled = false; + } m_log.DebugFormat("[PRIM LIMITS]: INITIALIZED MODULE"); } @@ -73,6 +83,10 @@ namespace OpenSim.Region.OptionalModules public void AddRegion(Scene scene) { + if(!m_enabled) + { + return; + } scene.Permissions.OnRezObject += CanRezObject; scene.Permissions.OnObjectEntry += CanObjectEnter; scene.Permissions.OnDuplicateObject += CanDuplicateObject; @@ -81,6 +95,10 @@ namespace OpenSim.Region.OptionalModules public void RemoveRegion(Scene scene) { + if(m_enabled) + { + return; + } scene.Permissions.OnRezObject -= CanRezObject; scene.Permissions.OnObjectEntry -= CanObjectEnter; scene.Permissions.OnDuplicateObject -= CanDuplicateObject; -- cgit v1.1