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 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/CoreModules/Framework') 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) -- cgit v1.1