From 04be8726d30fe4399a89c3a739d1967412c0b548 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 28 Sep 2008 22:01:37 +0000 Subject: 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. --- .../Modules/World/Estate/EstateManagementModule.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'OpenSim/Region/Environment/Modules/World/Estate') diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 3dddc2b..616132b 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs @@ -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 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; -- cgit v1.1