aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index 5bafec3..471b90f 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Collections.Generic;
30using log4net; 31using log4net;
31using Mono.Addins; 32using Mono.Addins;
32using Nini.Config; 33using Nini.Config;
@@ -50,27 +51,27 @@ namespace OpenSim.Region.OptionalModules
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 private bool m_enabled; 52 private bool m_enabled;
52 53
53 public string Name { get { return "Prim Limits Module"; } } 54 public string Name { get { return "PrimLimitsModule"; } }
54 55
55 public Type ReplaceableInterface { get { return null; } } 56 public Type ReplaceableInterface { get { return null; } }
56 57
57 public void Initialise(IConfigSource source) 58 public void Initialise(IConfigSource config)
58 { 59 {
59 IConfig moduleConfig = source.Configs["PrimLimitsModule"]; 60 IConfig myConfig = config.Configs["Startup"];
60 if (moduleConfig != null) 61
61 { 62 string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
62 this.m_enabled = moduleConfig.GetBoolean("EnforcePrimLimits", false); 63
63 } 64 List<string> modules=new List<string>(permissionModules.Split(','));
64 else 65
65 { 66 if(!modules.Contains("PrimLimitsModule"))
66 this.m_enabled = false; 67 return;
67 } 68
68 m_log.DebugFormat("[PRIM LIMITS]: INITIALIZED MODULE"); 69 m_log.DebugFormat("[PRIM LIMITS]: Initialized module");
70 m_enabled = true;
69 } 71 }
70 72
71 public void Close() 73 public void Close()
72 { 74 {
73 m_log.DebugFormat("[PRIM LIMITS]: CLOSED MODULE");
74 } 75 }
75 76
76 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
@@ -82,7 +83,7 @@ namespace OpenSim.Region.OptionalModules
82 scene.Permissions.OnRezObject += CanRezObject; 83 scene.Permissions.OnRezObject += CanRezObject;
83 scene.Permissions.OnObjectEntry += CanObjectEnter; 84 scene.Permissions.OnObjectEntry += CanObjectEnter;
84 scene.Permissions.OnDuplicateObject += CanDuplicateObject; 85 scene.Permissions.OnDuplicateObject += CanDuplicateObject;
85 m_log.DebugFormat("[PRIM LIMITS]: REGION {0} ADDED", scene.RegionInfo.RegionName); 86 m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName);
86 } 87 }
87 88
88 public void RemoveRegion(Scene scene) 89 public void RemoveRegion(Scene scene)
@@ -94,14 +95,13 @@ namespace OpenSim.Region.OptionalModules
94 scene.Permissions.OnRezObject -= CanRezObject; 95 scene.Permissions.OnRezObject -= CanRezObject;
95 scene.Permissions.OnObjectEntry -= CanObjectEnter; 96 scene.Permissions.OnObjectEntry -= CanObjectEnter;
96 scene.Permissions.OnDuplicateObject -= CanDuplicateObject; 97 scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
97 m_log.DebugFormat("[PRIM LIMITS]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
98 } 98 }
99 99
100 public void RegionLoaded(Scene scene) 100 public void RegionLoaded(Scene scene)
101 { 101 {
102 m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); 102 m_dialogModule = scene.RequestModuleInterface<IDialogModule>();
103 m_log.DebugFormat("[PRIM LIMITS]: REGION {0} LOADED", scene.RegionInfo.RegionName);
104 } 103 }
104
105 private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene) 105 private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene)
106 { 106 {
107 // This may be a little long winded and can probably be optomized 107 // This may be a little long winded and can probably be optomized
@@ -170,4 +170,4 @@ namespace OpenSim.Region.OptionalModules
170 return true; 170 return true;
171 } 171 }
172 } 172 }
173} \ No newline at end of file 173}