From a5860ad438885cbf76a36dc7958947355522b8cf Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 21 Jun 2008 03:29:08 +0000 Subject: * Adds Region ban capability to Regions. You access this by going to World->Region/Estate. Then on the Estate tab, at the lower right hand corner, clicking the 'Add' button and picking an avatar. * It only persists across reboots for the mySQL datastore currently. * Currently have stubs in the other datastores. --- OpenSim/Region/Environment/Scenes/Scene.cs | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index cfebd14..73b3a49 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1437,6 +1437,20 @@ namespace OpenSim.Region.Environment.Scenes } } + public void LoadRegionBanlist() + { + List regionbanlist = m_storageManager.DataStore.LoadRegionBanList(m_regInfo.RegionID); + m_regInfo.regionBanlist = regionbanlist; + } + public void AddToRegionBanlist(RegionBanListItem item) + { + m_storageManager.DataStore.AddToRegionBanlist(item); + } + + public void RemoveFromRegionBanlist(RegionBanListItem item) + { + m_storageManager.DataStore.RemoveFromRegionBanlist(item); + } #endregion #region Primitives Methods @@ -1854,6 +1868,18 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectPart RootPrim = GetSceneObjectPart(primID); if (RootPrim != null) { + if (m_regInfo.CheckIfUserBanned(RootPrim.OwnerID)) + { + SceneObjectGroup grp = RootPrim.ParentGroup; + if (grp != null) + { + DeleteSceneObject(grp); + } + + m_log.Info("[INTERREGION]: Denied prim crossing for banned avatar"); + + return false; + } if (RootPrim.Shape.PCode == (byte)PCode.Prim) { SceneObjectGroup grp = RootPrim.ParentGroup; @@ -2333,6 +2359,13 @@ namespace OpenSim.Region.Environment.Scenes { if (regionHandle == m_regInfo.RegionHandle) { + if (m_regInfo.CheckIfUserBanned(agent.AgentID)) + { + m_log.WarnFormat( + "[CONNECTION DEBUGGING]: Denied access to: {0} [{1}] at {2} because the user is on the region banlist", + agent.AgentID, regionHandle, RegionInfo.RegionName); + } + capsPaths[agent.AgentID] = agent.CapsPath; if (!agent.child) @@ -3599,5 +3632,9 @@ namespace OpenSim.Region.Environment.Scenes } #endregion + + } } + + \ No newline at end of file -- cgit v1.1