From 2b48ed60ecf45e4ec07af1cadbb6325c3e678a13 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 6 May 2010 02:02:12 +0200 Subject: Remove the m_Viewer variable and make the property a shortcut to the proper field in AgentCircuitData instead --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index fff024f..1a46837 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2651,10 +2651,7 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = CreateAndAddScenePresence(client); if (aCircuit != null) - { sp.Appearance = aCircuit.Appearance; - sp.Viewer = aCircuit.Viewer; - } // HERE!!! Do the initial attachments right here // first agent upon login is a root agent by design. diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fb66fcd..30eafd7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -218,8 +218,6 @@ namespace OpenSim.Region.Framework.Scenes private bool m_followCamAuto; private int m_movementUpdateCount; - private string m_Viewer = String.Empty; - private const int NumMovementsBetweenRayCast = 5; private bool CameraConstraintActive; @@ -654,8 +652,7 @@ namespace OpenSim.Region.Framework.Scenes public string Viewer { - get { return m_Viewer; } - set { m_Viewer = value; } + get { return m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode).Viewer; } } #endregion -- cgit v1.1 From ebc3726d52c772962cfa551721168079d5d563d2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 5 May 2010 16:54:48 -0700 Subject: Added copying of Viewer field to the agent circuit data that is being passed on TPs and crossings. (XmlRpcGroups files want to be committed too) --- .../EntityTransfer/EntityTransferModule.cs | 6 + .../Avatar/XmlRpcGroups/GroupsModule.cs | 62 ++++----- .../SimianGroupsServicesConnectorModule.cs | 150 ++++++++++----------- 3 files changed, 112 insertions(+), 106 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 80c0af8..f2b03e4 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -290,7 +290,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agentCircuit.child = true; agentCircuit.Appearance = sp.Appearance; if (currentAgentCircuit != null) + { agentCircuit.ServiceURLs = currentAgentCircuit.ServiceURLs; + agentCircuit.Viewer = currentAgentCircuit.Viewer; + } if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) { @@ -986,7 +989,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.child = true; agent.Appearance = sp.Appearance; if (currentAgentCircuit != null) + { agent.ServiceURLs = currentAgentCircuit.ServiceURLs; + agent.Viewer = currentAgentCircuit.Viewer; + } if (newRegions.Contains(neighbour.RegionHandle)) { diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 6b942cb..b2b8110 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -601,14 +601,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public List GroupMembersRequest(IClientAPI remoteClient, UUID groupID) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); - List data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); - - if (m_debugEnabled) - { - foreach (GroupMembersData member in data) - { - m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner); - } + List data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); + + if (m_debugEnabled) + { + foreach (GroupMembersData member in data) + { + m_log.DebugFormat("[GROUPS]: Member({0}) - IsOwner({1})", member.AgentID, member.IsOwner); + } } return data; @@ -628,14 +628,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); - List data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID); - - if (m_debugEnabled) - { - foreach (GroupRoleMembersData member in data) - { - m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID); - } + List data = m_groupData.GetGroupRoleMembers(GetRequestingAgentID(remoteClient), groupID); + + if (m_debugEnabled) + { + foreach (GroupRoleMembersData member in data) + { + m_log.DebugFormat("[GROUPS]: Member({0}) - Role({1})", member.MemberID, member.RoleID); + } } return data; } @@ -1144,11 +1144,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups OSDMap llDataStruct = new OSDMap(3); llDataStruct.Add("AgentData", AgentData); llDataStruct.Add("GroupData", GroupData); - llDataStruct.Add("NewGroupData", NewGroupData); - - if (m_debugEnabled) - { - m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct)); + llDataStruct.Add("NewGroupData", NewGroupData); + + if (m_debugEnabled) + { + m_log.InfoFormat("[GROUPS]: {0}", OSDParser.SerializeJsonString(llDataStruct)); } IEventQueue queue = remoteClient.Scene.RequestModuleInterface(); @@ -1308,16 +1308,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // } - #endregion - - private UUID GetRequestingAgentID(IClientAPI client) - { - UUID requestingAgentID = UUID.Zero; - if (client != null) - { - requestingAgentID = client.AgentId; - } - return requestingAgentID; + #endregion + + private UUID GetRequestingAgentID(IClientAPI client) + { + UUID requestingAgentID = UUID.Zero; + if (client != null) + { + requestingAgentID = client.AgentId; + } + return requestingAgentID; } } diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 590753e..bc05b0f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs @@ -288,8 +288,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) { - AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); - AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); + AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); + AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); @@ -413,7 +413,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } } else if ((groupName != null) && (groupName != string.Empty)) - { + { if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) { return null; @@ -422,7 +422,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups GroupRecord GroupInfo = new GroupRecord(); - GroupInfo.GroupID = groupID; + GroupInfo.GroupID = groupID; GroupInfo.GroupName = groupName; GroupInfo.Charter = GroupInfoMap["Charter"].AsString(); GroupInfo.ShowInList = GroupInfoMap["ShowInList"].AsBoolean(); @@ -751,9 +751,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) { GroupID = UserActiveGroup["GroupID"].AsUUID(); - } - - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Active GroupID : {0}", GroupID.ToString()); + } + + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Active GroupID : {0}", GroupID.ToString()); return GetAgentGroupMembership(requestingAgentID, agentID, GroupID); } @@ -781,24 +781,24 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups List Roles = new List(); - Dictionary GroupRoles; - if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) - { - Dictionary MemberRoles; - if (SimianGetGenericEntries(agentID, "GroupRole" + groupID.ToString(), out MemberRoles)) - { - foreach (KeyValuePair kvp in MemberRoles) - { - GroupRolesData data = new GroupRolesData(); - data.RoleID = UUID.Parse(kvp.Key); - data.Name = GroupRoles[kvp.Key]["Name"].AsString(); - data.Description = GroupRoles[kvp.Key]["Description"].AsString(); - data.Title = GroupRoles[kvp.Key]["Title"].AsString(); - data.Powers = GroupRoles[kvp.Key]["Powers"].AsULong(); - - Roles.Add(data); - } - } + Dictionary GroupRoles; + if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) + { + Dictionary MemberRoles; + if (SimianGetGenericEntries(agentID, "GroupRole" + groupID.ToString(), out MemberRoles)) + { + foreach (KeyValuePair kvp in MemberRoles) + { + GroupRolesData data = new GroupRolesData(); + data.RoleID = UUID.Parse(kvp.Key); + data.Name = GroupRoles[kvp.Key]["Name"].AsString(); + data.Description = GroupRoles[kvp.Key]["Description"].AsString(); + data.Title = GroupRoles[kvp.Key]["Title"].AsString(); + data.Powers = GroupRoles[kvp.Key]["Powers"].AsULong(); + + Roles.Add(data); + } + } } return Roles; } @@ -912,8 +912,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { foreach( KeyValuePair GroupRoleMember in GroupRoleMembers ) { - GroupRoleMembersData data = new GroupRoleMembersData(); - + GroupRoleMembersData data = new GroupRoleMembersData(); + data.MemberID = GroupRoleMember.Key; data.RoleID = UUID.Parse(Role.Key); @@ -1066,20 +1066,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups OSDMap Response = WebUtil.PostToService(m_serviceURL, RequestArgs); if (Response["Success"].AsBoolean() && Response["Entries"] is OSDArray) { - OSDArray entryArray = (OSDArray)Response["Entries"]; - if (entryArray.Count >= 1) - { - OSDMap entryMap = entryArray[0] as OSDMap; - key = entryMap["Key"].AsString(); - map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); - - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); - - return true; - } - else - { - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); + OSDArray entryArray = (OSDArray)Response["Entries"]; + if (entryArray.Count >= 1) + { + OSDMap entryMap = entryArray[0] as OSDMap; + key = entryMap["Key"].AsString(); + map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); + + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); + + return true; + } + else + { + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); } } else @@ -1106,20 +1106,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups OSDMap Response = WebUtil.PostToService(m_serviceURL, RequestArgs); if (Response["Success"].AsBoolean() && Response["Entries"] is OSDArray) { - OSDArray entryArray = (OSDArray)Response["Entries"]; - if (entryArray.Count >= 1) - { - OSDMap entryMap = entryArray[0] as OSDMap; - ownerID = entryMap["OwnerID"].AsUUID(); - map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); - - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); - - return true; - } - else - { - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); + OSDArray entryArray = (OSDArray)Response["Entries"]; + if (entryArray.Count >= 1) + { + OSDMap entryMap = entryArray[0] as OSDMap; + ownerID = entryMap["OwnerID"].AsUUID(); + map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); + + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); + + return true; + } + else + { + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); } } else @@ -1152,16 +1152,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { OSDMap entryMap = entryArray[0] as OSDMap; key = entryMap["Key"].AsString(); - map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); - - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); - + map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); + + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); + return true; - } - else - { - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); - } + } + else + { + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); + } } else { @@ -1191,13 +1191,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups OSDArray entryArray = (OSDArray)response["Entries"]; foreach (OSDMap entryMap in entryArray) - { - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); + { + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); } - if(maps.Count == 0) - { - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); + if(maps.Count == 0) + { + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); } return true; @@ -1229,14 +1229,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups OSDArray entryArray = (OSDArray)response["Entries"]; foreach (OSDMap entryMap in entryArray) - { + { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); maps.Add(entryMap["OwnerID"].AsUUID(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); - } - if (maps.Count == 0) - { - if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); - } + } + if (maps.Count == 0) + { + if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); + } return true; } else -- cgit v1.1 From 4183cef4094364d28fd4497fdb4332ff4be34914 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 5 May 2010 21:22:29 -0400 Subject: * Fixes LandDataSerializerTests on Windows by stripping CR from the serialization result since the reference serialization has LF only. * Added a bool result and then an Assert.That(result) because resharper was having a hard time with the equality compare in Assert.That. --- .../Serialization/Tests/LandDataSerializerTests.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs index 14e0462..70e87b3 100644 --- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs +++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs @@ -96,15 +96,19 @@ namespace OpenSim.Framework.Serialization.Tests [Test] public void LandDataSerializerSerializeTest() { - string serialized = LandDataSerializer.Serialize(this.land); + string serialized = LandDataSerializer.Serialize(this.land).Replace("\r\n", "\n"); Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string"); - Assert.That(serialized == LandDataSerializerTest.preSerialized, - "result of Serialize(LandData) does not match expected result"); - string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList); - Assert.That(serializedWithParcelAccessList.Length > 0, + // adding a simple boolean variable because resharper nUnit integration doesn't like this + // XML data in the Assert.That statement. Not sure why. + bool result = (serialized == preSerialized); + Assert.That(result, "result of Serialize LandData does not match expected result"); + + string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList).Replace("\r\n", "\n"); + Assert.That(serializedWithParcelAccessList.Length > 0, "Serialize(LandData) returned empty string for LandData object with ParcelAccessList"); - Assert.That(serializedWithParcelAccessList == LandDataSerializerTest.preSerializedWithParcelAccessList, + result = (serializedWithParcelAccessList == preSerializedWithParcelAccessList); + Assert.That(result, "result of Serialize(LandData) does not match expected result (pre-serialized with parcel access list"); } -- cgit v1.1 From 53594e599e7f10bed441007f29a08d23e41e9188 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 5 May 2010 21:12:13 -0700 Subject: * Fixes Library bugs in grid mode. Partly a missing check and partly a missing configuration. * Made previous Robust config changes consistent in Robust.HG.ini.example --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 ++++++++++++++++- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 20760b2..60f730d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1154,6 +1154,21 @@ namespace OpenSim.Region.Framework.Scenes if (folder == null) return; + // TODO: This code for looking in the folder for the library should be folded somewhere else + // so that this class doesn't have to know the details (and so that multiple libraries, etc. + // can be handled transparently). + InventoryFolderImpl fold = null; + if (LibraryService != null && LibraryService.LibraryRootFolder != null) + { + if ((fold = LibraryService.LibraryRootFolder.FindFolder(folder.ID)) != null) + { + client.SendInventoryFolderDetails( + fold.Owner, folder.ID, fold.RequestListOfItems(), + fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); + return; + } + } + // Fetch the folder contents InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); @@ -1164,7 +1179,7 @@ namespace OpenSim.Region.Framework.Scenes //m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); - if (containingFolder != null) + if (containingFolder != null && containingFolder != null) client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); } diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index bc10230..e25b1f1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -513,8 +513,8 @@ namespace OpenSim.Region.Framework.Scenes { // FIXME MAYBE: We're not handling sortOrder! - // TODO: This code for looking in the folder for the library should be folded back into the - // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc. + // TODO: This code for looking in the folder for the library should be folded somewhere else + // so that this class doesn't have to know the details (and so that multiple libraries, etc. // can be handled transparently). InventoryFolderImpl fold = null; if (LibraryService != null && LibraryService.LibraryRootFolder != null) -- cgit v1.1 From adc34c712967e1d90aaa11e2bd9ff538da1641c0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 May 2010 16:07:15 +0100 Subject: Ensure the show in search flag is cleared on ownership change. Also, when land is reclaimed, reset it's for sale flags so it can't be bought again right away. --- OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 4 ++++ OpenSim/Region/CoreModules/World/Land/LandObject.cs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 5750aa4..a691acd 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -1188,6 +1188,10 @@ namespace OpenSim.Region.CoreModules.World.Land land.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); land.LandData.GroupID = UUID.Zero; land.LandData.IsGroupOwned = false; + land.LandData.SalePrice = 0; + land.LandData.AuthBuyerID = UUID.Zero; + land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); + m_scene.ForEachClient(SendParcelOverlay); land.SendLandUpdateToClient(true, remote_client); } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index aca5514..3945142 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -247,7 +247,7 @@ namespace OpenSim.Region.CoreModules.World.Land newData.ClaimPrice = claimprice; newData.SalePrice = 0; newData.AuthBuyerID = UUID.Zero; - newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects); + newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); SendLandUpdateToAvatarsOverMe(true); @@ -260,6 +260,9 @@ namespace OpenSim.Region.CoreModules.World.Land newData.GroupID = groupID; newData.IsGroupOwned = true; + // Reset show in directory flag on deed + newData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); + m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); SendLandUpdateToAvatarsOverMe(true); -- cgit v1.1