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.

This commit is contained in:
meta7
2010-08-30 11:41:20 -07:00
parent 8a1640f0a1
commit 4cf5ef3cd4
5 changed files with 42 additions and 18 deletions

View File

@@ -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();
}
}
}
});