From 11c742a5a8b1edd97923cc445aa43e0ba92f1bce Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 02:16:41 +0100 Subject: Make bans work for teleport. Now teleport will complete block if the user is not allowed on the estate. If the user is allowed on no parcel, the teleport will also be blocked. If the user is allowed on a parcel, but not the desired one, the user will be shifted to the closest allowed location. --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 6 ++++++ .../ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index eb150d9..4bf2477 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -281,6 +281,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return; } + if (!m_aScene.SimulationService.QueryAccess(finalDestination, sp.ControllingClient.AgentId)) + { + sp.ControllingClient.SendTeleportFailed("The destination region has refused access"); + return; + } + sp.ControllingClient.SendTeleportStart(teleportFlags); // the avatar.Close below will clear the child region list. We need this below for (possibly) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 5be6486..aaf7bf3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs @@ -264,13 +264,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation foreach (Scene s in m_sceneList) { - if (s.RegionInfo.RegionHandle == destination.RegionHandle) - { - //m_log.Debug("[LOCAL COMMS]: Found region to send QueryAccess"); + if (s.RegionInfo.RegionID == destination.RegionID) return s.QueryAccess(id); - } } - //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); return false; } -- cgit v1.1