mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
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.
This commit is contained in:
@@ -121,7 +121,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
client.OnParcelReclaim += new ParcelReclaim(handleParcelReclaim);
|
||||
client.OnParcelInfoRequest += new ParcelInfoRequest(handleParcelInfo);
|
||||
client.OnParcelDwellRequest += new ParcelDwellRequest(handleParcelDwell);
|
||||
|
||||
|
||||
client.OnParcelDeedToGroup += new ParcelDeedToGroup(handleParcelDeedToGroup);
|
||||
|
||||
if (m_scene.Entities.ContainsKey(client.AgentId))
|
||||
{
|
||||
SendLandUpdate((ScenePresence)m_scene.Entities[client.AgentId], true);
|
||||
@@ -129,6 +131,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
@@ -1125,6 +1128,24 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void handleParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client)
|
||||
{
|
||||
// TODO: May want to validate that the group id is valid and that the remote client has the right to deed
|
||||
ILandObject land;
|
||||
lock (m_landList)
|
||||
{
|
||||
m_landList.TryGetValue(parcelLocalID, out land);
|
||||
}
|
||||
|
||||
if (land != null)
|
||||
{
|
||||
land.deedToGroup(groupID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region Land Object From Storage Functions
|
||||
|
||||
public void IncomingLandObjectsFromStorage(List<LandData> data)
|
||||
|
||||
@@ -232,6 +232,18 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
sendLandUpdateToAvatarsOverMe();
|
||||
}
|
||||
|
||||
public void deedToGroup(UUID groupID)
|
||||
{
|
||||
LandData newData = landData.Copy();
|
||||
newData.OwnerID = groupID;
|
||||
newData.GroupID = groupID;
|
||||
newData.IsGroupOwned = true;
|
||||
|
||||
m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
|
||||
|
||||
sendLandUpdateToAvatarsOverMe();
|
||||
}
|
||||
|
||||
public bool isEitherBannedOrRestricted(UUID avatar)
|
||||
{
|
||||
if (isBannedFromLand(avatar))
|
||||
|
||||
Reference in New Issue
Block a user