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.
0.6.0-stable
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

@ -298,6 +298,7 @@ namespace OpenSim.Framework
public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message); public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message);
public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics); public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics);
public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID prey); public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, UUID invoice, UUID senderID, UUID prey);
public delegate void EstateTeleportAllUsersHomeRequest(IClientAPI remoteClient, UUID invoice, UUID senderID);
public delegate void RegionHandleRequest(IClientAPI remoteClient, UUID regionID); public delegate void RegionHandleRequest(IClientAPI remoteClient, UUID regionID);
public delegate void ParcelInfoRequest(IClientAPI remoteClient, UUID parcelID); public delegate void ParcelInfoRequest(IClientAPI remoteClient, UUID parcelID);
@ -518,6 +519,7 @@ namespace OpenSim.Framework
event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
event EstateDebugRegionRequest OnEstateDebugRegionRequest; event EstateDebugRegionRequest OnEstateDebugRegionRequest;
event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
event UUIDNameRequest OnUUIDGroupNameRequest; event UUIDNameRequest OnUUIDGroupNameRequest;
event RegionHandleRequest OnRegionHandleRequest; event RegionHandleRequest OnRegionHandleRequest;

View File

@ -965,6 +965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
public event EstateDebugRegionRequest OnEstateDebugRegionRequest; public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
public event RegionHandleRequest OnRegionHandleRequest; public event RegionHandleRequest OnRegionHandleRequest;
public event ParcelInfoRequest OnParcelInfoRequest; public event ParcelInfoRequest OnParcelInfoRequest;
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
@ -5877,6 +5878,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey); OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey);
} }
break; break;
case "teleporthomeallusers":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false))
{
UUID invoice = messagePacket.MethodData.Invoice;
UUID SenderID = messagePacket.AgentData.AgentID;
OnEstateTeleportAllUsersHomeRequest(this, invoice, SenderID);
}
break;
case "colliders": case "colliders":
handlerLandStatRequest = OnLandStatRequest; handlerLandStatRequest = OnLandStatRequest;
if (handlerLandStatRequest != null) if (handlerLandStatRequest != null)

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) private void HandleRegionInfoRequest(IClientAPI remote_client)
{ {
@ -723,6 +745,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage;
client.OnEstateDebugRegionRequest += handleEstateDebugRegionRequest; client.OnEstateDebugRegionRequest += handleEstateDebugRegionRequest;
client.OnEstateTeleportOneUserHomeRequest += handleEstateTeleportOneUserHomeRequest; client.OnEstateTeleportOneUserHomeRequest += handleEstateTeleportOneUserHomeRequest;
client.OnEstateTeleportAllUsersHomeRequest += handleEstateTeleportAllUsersHomeRequest;
client.OnRegionInfoRequest += HandleRegionInfoRequest; client.OnRegionInfoRequest += HandleRegionInfoRequest;
client.OnEstateCovenantRequest += HandleEstateCovenantRequest; client.OnEstateCovenantRequest += HandleEstateCovenantRequest;

View File

@ -305,6 +305,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
public event EstateDebugRegionRequest OnEstateDebugRegionRequest; public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
public event EstateChangeInfo OnEstateChangeInfo; public event EstateChangeInfo OnEstateChangeInfo;
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;

View File

@ -201,6 +201,7 @@ namespace OpenSim.Region.Examples.SimpleModule
public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
public event EstateDebugRegionRequest OnEstateDebugRegionRequest; public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
public event ScriptReset OnScriptReset; public event ScriptReset OnScriptReset;
public event GetScriptRunning OnGetScriptRunning; public event GetScriptRunning OnGetScriptRunning;
public event SetScriptRunning OnSetScriptRunning; public event SetScriptRunning OnSetScriptRunning;