diff options
author | UbitUmarov | 2017-04-03 16:10:05 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-03 16:10:05 +0100 |
commit | eb11505d19be8c2b22776d927ac5b836bd5493c3 (patch) | |
tree | 03da3c94975e7be7ba6760e64d7687afd565d53e /OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | |
parent | store the physics inertia override in SQlite (diff) | |
download | opensim-SC_OLD-eb11505d19be8c2b22776d927ac5b836bd5493c3.zip opensim-SC_OLD-eb11505d19be8c2b22776d927ac5b836bd5493c3.tar.gz opensim-SC_OLD-eb11505d19be8c2b22776d927ac5b836bd5493c3.tar.bz2 opensim-SC_OLD-eb11505d19be8c2b22776d927ac5b836bd5493c3.tar.xz |
add bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject land) permissions check
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index af32d05..61b6d68 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | |||
@@ -83,6 +83,7 @@ namespace OpenSim.Region.OptionalModules | |||
83 | m_scene = scene; | 83 | m_scene = scene; |
84 | scene.Permissions.OnRezObject += CanRezObject; | 84 | scene.Permissions.OnRezObject += CanRezObject; |
85 | scene.Permissions.OnObjectEntry += CanObjectEnter; | 85 | scene.Permissions.OnObjectEntry += CanObjectEnter; |
86 | scene.Permissions.OnObjectEnterWithScripts += CanObjectEnterWithScripts; | ||
86 | scene.Permissions.OnDuplicateObject += CanDuplicateObject; | 87 | scene.Permissions.OnDuplicateObject += CanDuplicateObject; |
87 | 88 | ||
88 | m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName); | 89 | m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName); |
@@ -95,6 +96,7 @@ namespace OpenSim.Region.OptionalModules | |||
95 | 96 | ||
96 | m_scene.Permissions.OnRezObject -= CanRezObject; | 97 | m_scene.Permissions.OnRezObject -= CanRezObject; |
97 | m_scene.Permissions.OnObjectEntry -= CanObjectEnter; | 98 | m_scene.Permissions.OnObjectEntry -= CanObjectEnter; |
99 | scene.Permissions.OnObjectEnterWithScripts -= CanObjectEnterWithScripts; | ||
98 | m_scene.Permissions.OnDuplicateObject -= CanDuplicateObject; | 100 | m_scene.Permissions.OnDuplicateObject -= CanDuplicateObject; |
99 | } | 101 | } |
100 | 102 | ||
@@ -173,6 +175,26 @@ namespace OpenSim.Region.OptionalModules | |||
173 | return true; | 175 | return true; |
174 | } | 176 | } |
175 | 177 | ||
178 | private bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject newParcel) | ||
179 | { | ||
180 | if (sog == null) | ||
181 | return false; | ||
182 | |||
183 | if (newParcel == null) | ||
184 | return true; | ||
185 | |||
186 | int objectCount = sog.PrimCount; | ||
187 | |||
188 | // TODO: Add Special Case here for temporary prims | ||
189 | |||
190 | string response = DoCommonChecks(objectCount, sog.OwnerID, newParcel); | ||
191 | |||
192 | if (response != null) | ||
193 | return false; | ||
194 | |||
195 | return true; | ||
196 | } | ||
197 | |||
176 | private string DoCommonChecks(int objectCount, UUID ownerID, ILandObject lo) | 198 | private string DoCommonChecks(int objectCount, UUID ownerID, ILandObject lo) |
177 | { | 199 | { |
178 | string response = null; | 200 | string response = null; |