From 12c5bfa3e0f42232035d74b3768ea98211dc5e18 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 1 Aug 2008 21:08:00 +0000 Subject: Estate series, patch 9 (#9157) Adds the new access semantics and the new flag (allow only age verified) Plumbs in the abuse email address from sim to viewer. The other way around, libomv appears to be lacking support for the data field in the packet. Includes a migration, run prebuild! --- OpenSim/Data/MySQL/Resources/015_RegionStore.sql | 6 ++++++ OpenSim/Data/SQLite/Resources/008_RegionStore.sql | 6 ++++++ OpenSim/Framework/EstateSettings.cs | 8 ++++++++ OpenSim/Framework/IClientAPI.cs | 2 +- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 ++++--- .../Environment/Modules/World/Estate/EstateManagementModule.cs | 10 +++++++++- OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 2 +- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +- 8 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 OpenSim/Data/MySQL/Resources/015_RegionStore.sql create mode 100644 OpenSim/Data/SQLite/Resources/008_RegionStore.sql (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql b/OpenSim/Data/MySQL/Resources/015_RegionStore.sql new file mode 100644 index 0000000..6d4f9f3 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/015_RegionStore.sql @@ -0,0 +1,6 @@ +begin; + +alter table estate_settings add column DenyMinors tinyint not null; + +commit; + diff --git a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql b/OpenSim/Data/SQLite/Resources/008_RegionStore.sql new file mode 100644 index 0000000..28bfbf5 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/008_RegionStore.sql @@ -0,0 +1,6 @@ +begin; + +alter table estate_settings add column DenyMinors tinyint not null default 0; + +commit; + diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 31655f4..8a00f9d 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -231,6 +231,14 @@ namespace OpenSim.Framework set { m_EstateOwner = value; } } + private bool m_DenyMinors = false; + + public bool DenyMinors + { + get { return m_DenyMinors; } + set { m_DenyMinors = value; } + } + // All those lists... // private List l_EstateManagers = new List(); diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 18e187b..8d50c30 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -642,7 +642,7 @@ namespace OpenSim.Framework void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args); void SendEstateCovenantInformation(LLUUID covenant); - void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant); + void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail); void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags); void SendLandAccessListData(List avatars, uint accessFlag, int localLandID); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2800cc4..4e9b1ae 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2657,15 +2657,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP this.OutPacket(einfopack, ThrottleOutPacketType.Task); } - public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) + public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) { EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); packet.MethodData.Invoice = invoice; packet.AgentData.TransactionID = LLUUID.Random(); packet.MethodData.Method = Helpers.StringToField("estateupdateinfo"); - EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[9]; + EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[10]; - for (int i = 0; i < 9; i++) + for (int i = 0; i < 10; i++) { returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); } @@ -2681,6 +2681,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP returnblock[6].Parameter = Helpers.StringToField(covenant.ToString()); returnblock[7].Parameter = Helpers.StringToField("1160895077"); // what is this? returnblock[8].Parameter = Helpers.StringToField("1"); // what is this? + returnblock[9].Parameter = Helpers.StringToField(abuseEmail); packet.ParamList = returnblock; packet.Header.Reliable = false; diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 7ca1f3a..44f9a93 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs @@ -60,7 +60,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate m_scene.RegionInfo.EstateSettings.ParentEstateID, GetEstateFlags(), sun, - m_scene.RegionInfo.RegionSettings.Covenant); + m_scene.RegionInfo.RegionSettings.Covenant, + m_scene.RegionInfo.EstateSettings.AbuseEmail); remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, @@ -628,6 +629,11 @@ namespace OpenSim.Region.Environment.Modules.World.Estate else m_scene.RegionInfo.EstateSettings.DenyTransacted = false; + if ((parms1 & 0x40000000) != 0) + m_scene.RegionInfo.EstateSettings.DenyMinors = true; + else + m_scene.RegionInfo.EstateSettings.DenyMinors = false; + m_scene.RegionInfo.EstateSettings.Save(); float sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition; @@ -797,6 +803,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate flags |= Simulator.RegionFlags.ResetHomeOnTeleport; if (m_scene.RegionInfo.EstateSettings.TaxFree) flags |= Simulator.RegionFlags.TaxFree; + if (m_scene.RegionInfo.EstateSettings.DenyMinors) + flags |= (Simulator.RegionFlags)(1 << 30); return (uint)flags; } diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 357e454..4c28361 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -781,7 +781,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC public void SendEstateCovenantInformation(LLUUID covenant) { } - public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) + public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) { } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index b1e1854..9859dc2 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -773,7 +773,7 @@ namespace OpenSim.Region.Examples.SimpleModule public void SendEstateCovenantInformation(LLUUID covenant) { } - public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) + public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) { } -- cgit v1.1