aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs11
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs18
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs25
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs1
7 files changed, 66 insertions, 1 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index fa2ab0b..8eb82b2 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -514,6 +514,7 @@ namespace OpenSim.Framework
514 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); 514 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
515 515
516 public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client); 516 public delegate void ParcelAbandonRequest(int local_id, IClientAPI remote_client);
517 public delegate void ParcelReclaim(int local_id, IClientAPI remote_client);
517 518
518 public delegate void ParcelReturnObjectsRequest(int local_id, uint return_type, LLUUID[] agent_ids, LLUUID[] selected_ids, IClientAPI remote_client); 519 public delegate void ParcelReturnObjectsRequest(int local_id, uint return_type, LLUUID[] agent_ids, LLUUID[] selected_ids, IClientAPI remote_client);
519 520
@@ -793,6 +794,7 @@ namespace OpenSim.Framework
793 event ParcelSelectObjects OnParcelSelectObjects; 794 event ParcelSelectObjects OnParcelSelectObjects;
794 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 795 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
795 event ParcelAbandonRequest OnParcelAbandonRequest; 796 event ParcelAbandonRequest OnParcelAbandonRequest;
797 event ParcelReclaim OnParcelReclaim;
796 event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; 798 event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
797 event RegionInfoRequest OnRegionInfoRequest; 799 event RegionInfoRequest OnRegionInfoRequest;
798 event EstateCovenantRequest OnEstateCovenantRequest; 800 event EstateCovenantRequest OnEstateCovenantRequest;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index eb2a482..49174bd 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -235,6 +235,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
235 private ParcelSelectObjects handlerParcelSelectObjects = null; //OnParcelSelectObjects; 235 private ParcelSelectObjects handlerParcelSelectObjects = null; //OnParcelSelectObjects;
236 private ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = null; //OnParcelObjectOwnerRequest; 236 private ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = null; //OnParcelObjectOwnerRequest;
237 private ParcelAbandonRequest handlerParcelAbandonRequest = null; 237 private ParcelAbandonRequest handlerParcelAbandonRequest = null;
238 private ParcelReclaim handlerParcelReclaim = null;
238 private ParcelReturnObjectsRequest handlerParcelReturnObjectsRequest = null; 239 private ParcelReturnObjectsRequest handlerParcelReturnObjectsRequest = null;
239 private RegionInfoRequest handlerRegionInfoRequest = null; //OnRegionInfoRequest; 240 private RegionInfoRequest handlerRegionInfoRequest = null; //OnRegionInfoRequest;
240 private EstateCovenantRequest handlerEstateCovenantRequest = null; //OnEstateCovenantRequest; 241 private EstateCovenantRequest handlerEstateCovenantRequest = null; //OnEstateCovenantRequest;
@@ -868,6 +869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
868 public event ParcelSelectObjects OnParcelSelectObjects; 869 public event ParcelSelectObjects OnParcelSelectObjects;
869 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 870 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
870 public event ParcelAbandonRequest OnParcelAbandonRequest; 871 public event ParcelAbandonRequest OnParcelAbandonRequest;
872 public event ParcelReclaim OnParcelReclaim;
871 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; 873 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
872 public event RegionInfoRequest OnRegionInfoRequest; 874 public event RegionInfoRequest OnRegionInfoRequest;
873 public event EstateCovenantRequest OnEstateCovenantRequest; 875 public event EstateCovenantRequest OnEstateCovenantRequest;
@@ -5661,6 +5663,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5661 handlerParcelAbandonRequest(releasePacket.Data.LocalID, this); 5663 handlerParcelAbandonRequest(releasePacket.Data.LocalID, this);
5662 } 5664 }
5663 break; 5665 break;
5666 case PacketType.ParcelReclaim:
5667 ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack;
5668
5669 handlerParcelReclaim = OnParcelReclaim;
5670 if (handlerParcelReclaim != null)
5671 {
5672 handlerParcelReclaim(reclaimPacket.Data.LocalID, this);
5673 }
5674 break;
5664 case PacketType.ParcelReturnObjects: 5675 case PacketType.ParcelReturnObjects:
5665 5676
5666 5677
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 984bc4e..05bd983 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -94,6 +94,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
94 client.OnParcelAccessListRequest += new ParcelAccessListRequest(handleParcelAccessRequest); 94 client.OnParcelAccessListRequest += new ParcelAccessListRequest(handleParcelAccessRequest);
95 client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(handleParcelAccessUpdateRequest); 95 client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(handleParcelAccessUpdateRequest);
96 client.OnParcelAbandonRequest += new ParcelAbandonRequest(handleParcelAbandonRequest); 96 client.OnParcelAbandonRequest += new ParcelAbandonRequest(handleParcelAbandonRequest);
97 client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim);
97 98
98 if (m_scene.Entities.ContainsKey(client.AgentId)) 99 if (m_scene.Entities.ContainsKey(client.AgentId))
99 { 100 {
@@ -932,6 +933,21 @@ namespace OpenSim.Region.Environment.Modules.World.Land
932 { 933 {
933 landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 934 landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
934 m_scene.Broadcast(SendParcelOverlay); 935 m_scene.Broadcast(SendParcelOverlay);
936 landList[local_id].sendLandUpdateToClient(remote_client);
937 }
938 }
939
940 }
941
942 public void handleParcelReclaim(int local_id, IClientAPI remote_client)
943 {
944 if (landList.ContainsKey(local_id))
945 {
946 if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
947 {
948 landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
949 m_scene.Broadcast(SendParcelOverlay);
950 landList[local_id].sendLandUpdateToClient(remote_client);
935 } 951 }
936 } 952 }
937 953
@@ -1060,4 +1076,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1060 } 1076 }
1061 } 1077 }
1062 1078
1063} \ No newline at end of file 1079}
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index f4d2848..05a4146 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -243,6 +243,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
243 public event ParcelJoinRequest OnParcelJoinRequest; 243 public event ParcelJoinRequest OnParcelJoinRequest;
244 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 244 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
245 public event ParcelAbandonRequest OnParcelAbandonRequest; 245 public event ParcelAbandonRequest OnParcelAbandonRequest;
246 public event ParcelReclaim OnParcelReclaim;
246 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; 247 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
247 public event ParcelAccessListRequest OnParcelAccessListRequest; 248 public event ParcelAccessListRequest OnParcelAccessListRequest;
248 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; 249 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index a851cad..e8defb7 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -143,6 +143,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
143 m_scene.ExternalChecks.addSetBypassPermissions(SetBypassPermissions); //FULLY IMPLEMENTED 143 m_scene.ExternalChecks.addSetBypassPermissions(SetBypassPermissions); //FULLY IMPLEMENTED
144 m_scene.ExternalChecks.addPropagatePermissions(PropagatePermissions); //FULLY IMPLEMENTED 144 m_scene.ExternalChecks.addPropagatePermissions(PropagatePermissions); //FULLY IMPLEMENTED
145 m_scene.ExternalChecks.addCheckAbandonParcel(CanAbandonParcel); //FULLY IMPLEMENTED 145 m_scene.ExternalChecks.addCheckAbandonParcel(CanAbandonParcel); //FULLY IMPLEMENTED
146 m_scene.ExternalChecks.addCheckReclaimParcel(CanReclaimParcel); //FULLY IMPLEMENTED
146 m_scene.ExternalChecks.addGenerateClientFlags(GenerateClientFlags); //NOT YET FULLY IMPLEMENTED 147 m_scene.ExternalChecks.addGenerateClientFlags(GenerateClientFlags); //NOT YET FULLY IMPLEMENTED
147 m_scene.ExternalChecks.addCheckBeGodLike(CanBeGodLike); //FULLY IMPLEMENTED 148 m_scene.ExternalChecks.addCheckBeGodLike(CanBeGodLike); //FULLY IMPLEMENTED
148 m_scene.ExternalChecks.addCheckDuplicateObject(CanDuplicateObject); //FULLY IMPLEMENTED 149 m_scene.ExternalChecks.addCheckDuplicateObject(CanDuplicateObject); //FULLY IMPLEMENTED
@@ -531,6 +532,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
531 return GenericParcelPermission(user, parcel); 532 return GenericParcelPermission(user, parcel);
532 } 533 }
533 534
535 private bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene)
536 {
537 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
538 if (m_bypassPermissions) return m_bypassPermissionsValue;
539
540 return GenericParcelPermission(user, parcel);
541 }
542
534 private bool CanBeGodLike(LLUUID user, Scene scene) 543 private bool CanBeGodLike(LLUUID user, Scene scene)
535 { 544 {
536 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 545 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
index eac9e25..dba10df 100644
--- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
@@ -899,6 +899,31 @@ namespace OpenSim.Region.Environment.Scenes
899 } 899 }
900 #endregion 900 #endregion
901 901
902 public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene);
903 private List<CanReclaimParcel> CanReclaimParcelCheckFunctions = new List<CanReclaimParcel>();
904
905 public void addCheckReclaimParcel(CanReclaimParcel delegateFunc)
906 {
907 if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc))
908 CanReclaimParcelCheckFunctions.Add(delegateFunc);
909 }
910 public void removeCheckReclaimParcel(CanReclaimParcel delegateFunc)
911 {
912 if (CanReclaimParcelCheckFunctions.Contains(delegateFunc))
913 CanReclaimParcelCheckFunctions.Remove(delegateFunc);
914 }
915
916 public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel)
917 {
918 foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions)
919 {
920 if (check(user, parcel, m_scene) == false)
921 {
922 return false;
923 }
924 }
925 return true;
926 }
902 public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene); 927 public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene);
903 private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>(); 928 private List<CanBuyLand> CanBuyLandCheckFunctions = new List<CanBuyLand>();
904 929
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index a097f23..090ef37 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -148,6 +148,7 @@ namespace OpenSim.Region.Examples.SimpleModule
148 public event ParcelJoinRequest OnParcelJoinRequest; 148 public event ParcelJoinRequest OnParcelJoinRequest;
149 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 149 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
150 public event ParcelAbandonRequest OnParcelAbandonRequest; 150 public event ParcelAbandonRequest OnParcelAbandonRequest;
151 public event ParcelReclaim OnParcelReclaim;
151 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; 152 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
152 public event ParcelAccessListRequest OnParcelAccessListRequest; 153 public event ParcelAccessListRequest OnParcelAccessListRequest;
153 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; 154 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;