From 4cf5ef3cd4c6712f74615385a03217f5d4cecb80 Mon Sep 17 00:00:00 2001 From: meta7 Date: Mon, 30 Aug 2010 11:41:20 -0700 Subject: Kick the user from the region in the circumstance that the TP home failed - ONLY if it was triggered by an estate ban. This makes baby jesus cry, and should be fixed to search for alternative regions if the home region is unavailable. --- .../CoreModules/World/Estate/EstateManagementModule.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 171e0b9..8411d04 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -345,7 +345,11 @@ namespace OpenSim.Region.CoreModules.World.Estate { if (!s.IsChildAgent) { - m_scene.TeleportClientHome(user, s.ControllingClient); + if (!m_scene.TeleportClientHome(user, s.ControllingClient)) + { + s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out."); + s.ControllingClient.Close(); + } } } @@ -479,7 +483,11 @@ namespace OpenSim.Region.CoreModules.World.Estate ScenePresence s = m_scene.GetScenePresence(prey); if (s != null) { - m_scene.TeleportClientHome(prey, s.ControllingClient); + if (!m_scene.TeleportClientHome(prey, s.ControllingClient)) + { + s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); + s.ControllingClient.Close(); + } } } } @@ -498,7 +506,11 @@ namespace OpenSim.Region.CoreModules.World.Estate // Also make sure they are actually in the region if (p != null && !p.IsChildAgent) { - m_scene.TeleportClientHome(p.UUID, p.ControllingClient); + if (!m_scene.TeleportClientHome(p.UUID, p.ControllingClient)) + { + p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); + p.ControllingClient.Close(); + } } } }); -- cgit v1.1