Mantis#296. Thank you kindly, Idb for a patch that resolves:

Estate/ Manager Owner Uses the Region/Estate Menu Region TAB, 
and uses "Teleport Home All Users..." (Action Button), the 
action will complete but no one will be teleported and all 
users still function in the region ok.
This commit is contained in:
Charles Krinke
2008-09-28 22:01:37 +00:00
parent ebbbd37605
commit 04be8726d3
5 changed files with 36 additions and 0 deletions

View File

@@ -383,6 +383,28 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
}
}
private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
{
// Get a fresh list that will not change as people get teleported away
List<ScenePresence> prescences = m_scene.GetScenePresences();
foreach (ScenePresence p in prescences)
{
if (p.UUID != senderID)
{
// make sure they are still there, we could be working down a long list
ScenePresence s = m_scene.GetScenePresence(p.UUID);
if (s != null)
{
// Also make sure they are actually in the region
if (!s.IsChildAgent)
{
m_scene.TeleportClientHome(s.UUID, s.ControllingClient);
}
}
}
}
}
private void HandleRegionInfoRequest(IClientAPI remote_client)
{
@@ -723,6 +745,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage;
client.OnEstateDebugRegionRequest += handleEstateDebugRegionRequest;
client.OnEstateTeleportOneUserHomeRequest += handleEstateTeleportOneUserHomeRequest;
client.OnEstateTeleportAllUsersHomeRequest += handleEstateTeleportAllUsersHomeRequest;
client.OnRegionInfoRequest += HandleRegionInfoRequest;
client.OnEstateCovenantRequest += HandleEstateCovenantRequest;