From 163ee8216873f963efd3ea42dd007b095214bce0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 20 Jun 2011 02:29:09 +0200 Subject: [PATCH] Add some flags to control content in search better --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 9 +++++++-- OpenSim/Framework/RegionSettings.cs | 13 +++++++++++++ .../World/Estate/EstateManagementModule.cs | 4 ++++ OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 3306968a7d..0754ca8a75 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -1011,7 +1011,7 @@ namespace OpenSim.Data.MySQL "use_estate_sun, fixed_sun, sun_position, " + "covenant, Sandbox, sunvectorx, sunvectory, " + "sunvectorz, loaded_creation_datetime, " + - "loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " + + "loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " + "?BlockFly, ?AllowDamage, ?RestrictPushing, " + "?AllowLandResell, ?AllowLandJoinDivide, " + "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + @@ -1026,7 +1026,7 @@ namespace OpenSim.Data.MySQL "?SunPosition, ?Covenant, ?Sandbox, " + "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + "?LoadedCreationDateTime, ?LoadedCreationID, " + - "?TerrainImageID)"; + "?TerrainImageID, ?block_search, ?casino)"; FillRegionSettingsCommand(cmd, rs); @@ -1315,6 +1315,9 @@ namespace OpenSim.Data.MySQL newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); + newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]); + newSettings.Casino = Convert.ToBoolean(row["casino"]); + return newSettings; } @@ -1644,6 +1647,8 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); + cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch); + cmd.Parameters.AddWithValue("casino", settings.Casino); } diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 673cf203f8..f0786fc90d 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -397,5 +397,18 @@ namespace OpenSim.Framework set { m_LoadedCreationID = value; } } + private bool m_GodBlockSearch = false; + public bool GodBlockSearch + { + get { return m_GodBlockSearch; } + set { m_GodBlockSearch = value; } + } + + private bool m_Casino = false; + public bool Casino + { + get { return m_Casino; } + set { m_Casino = value; } + } } } diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index bc76a7cb12..b96f300f37 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -1182,6 +1182,10 @@ namespace OpenSim.Region.CoreModules.World.Estate flags |= RegionFlags.AllowParcelChanges; if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) flags |= RegionFlags.BlockParcelSearch; + if (Scene.RegionInfo.RegionSettings.GodBlockSearch) + flags |= (RegionFlags)(1 << 11); + if (Scene.RegionInfo.RegionSettings.Casino) + flags |= (RegionFlags)(1 << 10); if (Scene.RegionInfo.RegionSettings.FixedSun) flags |= RegionFlags.SunFixed; diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 6c9bb10cc1..2a6d362833 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -304,7 +304,7 @@ namespace OpenSim.Region.CoreModules.World.Land allowedDelta |= (uint)(ParcelFlags.ShowDirectory | ParcelFlags.AllowPublish | - ParcelFlags.MaturePublish); + ParcelFlags.MaturePublish) | (uint)(1 << 23); } if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity))