mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user