aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs20
-rw-r--r--bin/OpenSim.ini.example4
2 files changed, 23 insertions, 1 deletions
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
56 { 56 {
57 protected IDialogModule m_dialogModule; 57 protected IDialogModule m_dialogModule;
58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 59 private bool m_enabled;
60
60 public string Name { get { return "Prim Limits Module"; } } 61 public string Name { get { return "Prim Limits Module"; } }
61 62
62 public Type ReplaceableInterface { get { return null; } } 63 public Type ReplaceableInterface { get { return null; } }
63 64
64 public void Initialise(IConfigSource source) 65 public void Initialise(IConfigSource source)
65 { 66 {
67 IConfig moduleConfig = source.Configs["PrimLimitsModule"];
68 if (moduleConfig != null)
69 {
70 this.m_enabled = moduleConfig.GetBoolean("EnforcePrimLimits", false);
71 }
72 else
73 {
74 this.m_enabled = false;
75 }
66 m_log.DebugFormat("[PRIM LIMITS]: INITIALIZED MODULE"); 76 m_log.DebugFormat("[PRIM LIMITS]: INITIALIZED MODULE");
67 } 77 }
68 78
@@ -73,6 +83,10 @@ namespace OpenSim.Region.OptionalModules
73 83
74 public void AddRegion(Scene scene) 84 public void AddRegion(Scene scene)
75 { 85 {
86 if(!m_enabled)
87 {
88 return;
89 }
76 scene.Permissions.OnRezObject += CanRezObject; 90 scene.Permissions.OnRezObject += CanRezObject;
77 scene.Permissions.OnObjectEntry += CanObjectEnter; 91 scene.Permissions.OnObjectEntry += CanObjectEnter;
78 scene.Permissions.OnDuplicateObject += CanDuplicateObject; 92 scene.Permissions.OnDuplicateObject += CanDuplicateObject;
@@ -81,6 +95,10 @@ namespace OpenSim.Region.OptionalModules
81 95
82 public void RemoveRegion(Scene scene) 96 public void RemoveRegion(Scene scene)
83 { 97 {
98 if(m_enabled)
99 {
100 return;
101 }
84 scene.Permissions.OnRezObject -= CanRezObject; 102 scene.Permissions.OnRezObject -= CanRezObject;
85 scene.Permissions.OnObjectEntry -= CanObjectEnter; 103 scene.Permissions.OnObjectEntry -= CanObjectEnter;
86 scene.Permissions.OnDuplicateObject -= CanDuplicateObject; 104 scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 13dc9a6..c5df0db 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -736,6 +736,10 @@
736 ;; Enable media on a prim facilities 736 ;; Enable media on a prim facilities
737 ; Enabled = true; 737 ; Enabled = true;
738 738
739[PrimLimitsModule]
740 ;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false
741 ;; Enable parcel prim limits. Off by default to emulate pre-existing behavior.
742 ; EnforcePrimLimits = false
739 743
740[Architecture] 744[Architecture]
741 ;# {Include-Architecture} {} {Choose one of the following architectures} {config-include/Standalone.ini config-include/StandaloneHypergrid.ini config-include/Grid.ini config-include/GridHypergrid.ini config-include/SimianGrid.ini config-include/HyperSimianGrid.ini} config-include/Standalone.ini 745 ;# {Include-Architecture} {} {Choose one of the following architectures} {config-include/Standalone.ini config-include/StandaloneHypergrid.ini config-include/Grid.ini config-include/GridHypergrid.ini config-include/SimianGrid.ini config-include/HyperSimianGrid.ini} config-include/Standalone.ini