From dfe11566f43a60aaf0dda466a9425d8a1cc1d2e4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 20:18:36 +0100 Subject: Fix parcel bans to work only on the avatars they're supposed to work on instead of pushing all avatars, even the ones that are allowed. --- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ae48c02..b6d9a02 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4878,7 +4878,6 @@ namespace OpenSim.Region.Framework.Scenes Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); return nearestRegionEdgePoint; - return null; } private Vector3 GetParcelCenterAtGround(ILandObject parcel) -- cgit v1.1 From d206721e2f8833f6c95fa9fda350f0187c24d34f Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 9 Nov 2010 22:41:40 +0100 Subject: Add option SeeIntoBannedRegion to allow band to act like SL, where you can see in but not enter. Defaults to false, so no change. --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b6d9a02..a449cca 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -84,6 +84,7 @@ namespace OpenSim.Region.Framework.Scenes // TODO: need to figure out how allow client agents but deny // root agents when ACL denies access to root agent public bool m_strictAccessControl = true; + public bool m_seeIntoBannedRegion = false; public int MaxUndoCount = 5; public bool LoginsDisabled = true; public bool LoadingPrims; @@ -683,6 +684,7 @@ namespace OpenSim.Region.Framework.Scenes } m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); + m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion); CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false); m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true); @@ -3688,7 +3690,7 @@ namespace OpenSim.Region.Framework.Scenes if (m_regInfo.EstateSettings != null) { - if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) + if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID)) { m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist", agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); @@ -3878,6 +3880,12 @@ namespace OpenSim.Region.Framework.Scenes // We have to wait until the viewer contacts this region after receiving EAC. // That calls AddNewClient, which finally creates the ScenePresence + if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID)) + { + m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID); + return false; + } + int num = m_sceneGraph.GetNumberOfScenePresences(); if (num >= RegionInfo.RegionSettings.AgentLimit) -- cgit v1.1 From aace455249b2ea8c033871f39f23409119760932 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 10 Nov 2010 16:22:55 +0100 Subject: Prevent teleporting to a region when the egent is banned in all parcels --- OpenSim/Region/Framework/Scenes/Scene.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a449cca..dd06be2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3886,6 +3886,13 @@ namespace OpenSim.Region.Framework.Scenes return false; } + ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); + if (nearestParcel == null) + { + m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); + return false; + } + int num = m_sceneGraph.GetNumberOfScenePresences(); if (num >= RegionInfo.RegionSettings.AgentLimit) -- cgit v1.1