aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index 3491792..a7f3dd7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes
78 public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); 78 public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
79 public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); 79 public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
80 public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene); 80 public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene);
81 public delegate bool DeedObjectHandler(UUID user, UUID group, Scene scene); 81 public delegate bool DeedObjectHandler(ScenePresence sp, SceneObjectGroup sog, UUID targetGroupID);
82 public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene); 82 public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene);
83 public delegate bool LinkObjectHandler(UUID user, UUID objectID); 83 public delegate bool LinkObjectHandler(UUID user, UUID objectID);
84 public delegate bool DelinkObjectHandler(UUID user, UUID objectID); 84 public delegate bool DelinkObjectHandler(UUID user, UUID objectID);
@@ -934,15 +934,20 @@ namespace OpenSim.Region.Framework.Scenes
934 return true; 934 return true;
935 } 935 }
936 936
937 public bool CanDeedObject(UUID user, UUID group) 937 public bool CanDeedObject(IClientAPI client, SceneObjectGroup sog, UUID targetGroupID)
938 { 938 {
939 DeedObjectHandler handler = OnDeedObject; 939 DeedObjectHandler handler = OnDeedObject;
940 if (handler != null) 940 if (handler != null)
941 { 941 {
942 if(sog == null || client == null || client.SceneAgent == null || targetGroupID == UUID.Zero)
943 return false;
944
945 ScenePresence sp = client.SceneAgent as ScenePresence;
946
942 Delegate[] list = handler.GetInvocationList(); 947 Delegate[] list = handler.GetInvocationList();
943 foreach (DeedObjectHandler h in list) 948 foreach (DeedObjectHandler h in list)
944 { 949 {
945 if (h(user, group, m_scene) == false) 950 if (h(sp, sog, targetGroupID) == false)
946 return false; 951 return false;
947 } 952 }
948 } 953 }