diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 20 |
1 files changed, 19 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; |