aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Permissions.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index 45d710a..6d3b82f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Framework.Scenes
54 public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); 54 public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID);
55 public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); 55 public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp);
56 public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); 56 public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint);
57 public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List<SceneObjectGroup> objects); 57 public delegate bool ReturnObjectsHandler(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects);
58 public delegate bool InstantMessageHandler(UUID user, UUID target); 58 public delegate bool InstantMessageHandler(UUID user, UUID target);
59 public delegate bool InventoryTransferHandler(UUID user, UUID target); 59 public delegate bool InventoryTransferHandler(UUID user, UUID target);
60 public delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user); 60 public delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user);
@@ -556,17 +556,24 @@ namespace OpenSim.Region.Framework.Scenes
556 #endregion 556 #endregion
557 557
558 #region RETURN OBJECT 558 #region RETURN OBJECT
559 public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) 559 public bool CanReturnObjects(ILandObject land, IClientAPI client, List<SceneObjectGroup> objects)
560 { 560 {
561 bool result = true; 561 bool result = true;
562 562
563 ReturnObjectsHandler handler = OnReturnObjects; 563 ReturnObjectsHandler handler = OnReturnObjects;
564 if (handler != null) 564 if (handler != null)
565 { 565 {
566 if(objects == null)
567 return false;
568
569 ScenePresence sp = null;
570 if(client != null && client.SceneAgent != null)
571 sp = client.SceneAgent as ScenePresence;
572
566 Delegate[] list = handler.GetInvocationList(); 573 Delegate[] list = handler.GetInvocationList();
567 foreach (ReturnObjectsHandler h in list) 574 foreach (ReturnObjectsHandler h in list)
568 { 575 {
569 if (h(land, user, objects) == false) 576 if (h(land, sp, objects) == false)
570 { 577 {
571 result = false; 578 result = false;
572 break; 579 break;