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/Framework/Scenes/Scene.Permissions.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/Framework/Scenes/Scene.Permissions.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 7d69a9b..c55a7a6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
56 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); | 56 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); |
57 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); | 57 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
58 | public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); | 58 | public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); |
59 | public delegate bool ObjectEnterWithScriptsHandler(SceneObjectGroup sog, ILandObject land); | ||
59 | public delegate bool ReturnObjectsHandler(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects); | 60 | public delegate bool ReturnObjectsHandler(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects); |
60 | public delegate bool InstantMessageHandler(UUID user, UUID target); | 61 | public delegate bool InstantMessageHandler(UUID user, UUID target); |
61 | public delegate bool InventoryTransferHandler(UUID user, UUID target); | 62 | public delegate bool InventoryTransferHandler(UUID user, UUID target); |
@@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
135 | public event EditObjectInventoryHandler OnEditObjectInventory; | 136 | public event EditObjectInventoryHandler OnEditObjectInventory; |
136 | public event MoveObjectHandler OnMoveObject; | 137 | public event MoveObjectHandler OnMoveObject; |
137 | public event ObjectEntryHandler OnObjectEntry; | 138 | public event ObjectEntryHandler OnObjectEntry; |
139 | public event ObjectEnterWithScriptsHandler OnObjectEnterWithScripts; | ||
138 | public event ReturnObjectsHandler OnReturnObjects; | 140 | public event ReturnObjectsHandler OnReturnObjects; |
139 | public event InstantMessageHandler OnInstantMessage; | 141 | public event InstantMessageHandler OnInstantMessage; |
140 | public event InventoryTransferHandler OnInventoryTransfer; | 142 | public event InventoryTransferHandler OnInventoryTransfer; |
@@ -565,6 +567,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
565 | return true; | 567 | return true; |
566 | } | 568 | } |
567 | 569 | ||
570 | public bool CanObjectEnterWithScripts(SceneObjectGroup sog, ILandObject land) | ||
571 | { | ||
572 | ObjectEnterWithScriptsHandler handler = OnObjectEnterWithScripts; | ||
573 | if (handler != null) | ||
574 | { | ||
575 | Delegate[] list = handler.GetInvocationList(); | ||
576 | foreach (ObjectEnterWithScriptsHandler h in list) | ||
577 | { | ||
578 | if (h(sog, land) == false) | ||
579 | return false; | ||
580 | } | ||
581 | } | ||
582 | return true; | ||
583 | } | ||
584 | |||
568 | #endregion | 585 | #endregion |
569 | 586 | ||
570 | #region RETURN OBJECT | 587 | #region RETURN OBJECT |