aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs23
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs12
2 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 4ae617d..d7bd78b 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -121,7 +121,9 @@ namespace OpenSim.Region.CoreModules.World.Land
121 client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim); 121 client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim);
122 client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo); 122 client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo);
123 client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell); 123 client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell);
124 124
125 client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup);
126
125 if (m_scene.Entities.ContainsKey(client.AgentId)) 127 if (m_scene.Entities.ContainsKey(client.AgentId))
126 { 128 {
127 SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true); 129 SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true);
@@ -129,6 +131,7 @@ namespace OpenSim.Region.CoreModules.World.Land
129 } 131 }
130 } 132 }
131 133
134
132 public void PostInitialise() 135 public void PostInitialise()
133 { 136 {
134 } 137 }
@@ -1125,6 +1128,24 @@ namespace OpenSim.Region.CoreModules.World.Land
1125 } 1128 }
1126 } 1129 }
1127 1130
1131
1132 void handleParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
1133 {
1134 // TODO: May want to validate that the group id is valid and that the remote client has the right to deed
1135 ILandObject land;
1136 lock (m_landList)
1137 {
1138 m_landList.TryGetValue(parcelLocalID, out land);
1139 }
1140
1141 if (land != null)
1142 {
1143 land.deedToGroup(groupID);
1144 }
1145
1146 }
1147
1148
1128 #region Land Object From Storage Functions 1149 #region Land Object From Storage Functions
1129 1150
1130 public void IncomingLandObjectsFromStorage(List<LandData> data) 1151 public void IncomingLandObjectsFromStorage(List<LandData> data)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 2cf739b..ce66e46 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -232,6 +232,18 @@ namespace OpenSim.Region.CoreModules.World.Land
232 sendLandUpdateToAvatarsOverMe(); 232 sendLandUpdateToAvatarsOverMe();
233 } 233 }
234 234
235 public void deedToGroup(UUID groupID)
236 {
237 LandData newData = landData.Copy();
238 newData.OwnerID = groupID;
239 newData.GroupID = groupID;
240 newData.IsGroupOwned = true;
241
242 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
243
244 sendLandUpdateToAvatarsOverMe();
245 }
246
235 public bool isEitherBannedOrRestricted(UUID avatar) 247 public bool isEitherBannedOrRestricted(UUID avatar)
236 { 248 {
237 if (isBannedFromLand(avatar)) 249 if (isBannedFromLand(avatar))