aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2009-04-19 00:11:14 +0000
committerCharles Krinke2009-04-19 00:11:14 +0000
commita416e75ddba9de7448c00ecb88cb2f1a1949dac2 (patch)
tree32b39c6cc4f82689b0b0ffb5ed0b8f875c534a03 /OpenSim
parentBug fix in HG asset posts. Get the inner assets not just from mem cache but f... (diff)
downloadopensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.zip
opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.tar.gz
opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.tar.bz2
opensim-SC_OLD-a416e75ddba9de7448c00ecb88cb2f1a1949dac2.tar.xz
Thank you kindly, MCortez, for a patch that:
This hooks up the LandManagementModule to handle the DeedParcelToGroup packet. Now people can start testing land assigned to and owned by groups. Also fixes a viewer crash issue when searching for and then joining a group with an agent that is not already being tracked by groups server.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs23
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/ILandObject.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs5
4 files changed, 40 insertions, 2 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))
diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
index db3c9bf..1945b98 100644
--- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs
+++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs
@@ -76,6 +76,8 @@ namespace OpenSim.Region.Framework.Interfaces
76 void removePrimFromCount(SceneObjectGroup obj); 76 void removePrimFromCount(SceneObjectGroup obj);
77 void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area); 77 void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
78 78
79 void deedToGroup(UUID groupID);
80
79 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); 81 void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
80 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); 82 void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
81 83
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
index 6252d56..5ebab65 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
@@ -552,7 +552,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
552 { 552 {
553 GroupTitlesData title = new GroupTitlesData(); 553 GroupTitlesData title = new GroupTitlesData();
554 title.Name = role.Name; 554 title.Name = role.Name;
555 title.Selected = agentMembership.ActiveRole == role.RoleID; 555 if (agentMembership != null)
556 {
557 title.Selected = agentMembership.ActiveRole == role.RoleID;
558 }
556 title.UUID = role.RoleID; 559 title.UUID = role.RoleID;
557 } 560 }
558 561