mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
When a shared module hooks OnClientClosed, it has no way of finding
out which client connection has closed. So, in multi-region sims, things can get messy fast. This introduces a second parameters, which is a Scene object ref. Minor adjustments to custom modules may be required due to this change.
This commit is contained in:
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
||||
|
||||
public delegate void ClientClosed(UUID clientID);
|
||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||
|
||||
public event ClientClosed OnClientClosed;
|
||||
|
||||
@@ -733,12 +733,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerClientClosed(UUID ClientID)
|
||||
public void TriggerClientClosed(UUID ClientID, Scene scene)
|
||||
{
|
||||
handlerClientClosed = OnClientClosed;
|
||||
if (handlerClientClosed != null)
|
||||
{
|
||||
handlerClientClosed(ClientID);
|
||||
handlerClientClosed(ClientID, scene);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
|
||||
|
||||
}
|
||||
m_eventManager.TriggerClientClosed(agentID);
|
||||
m_eventManager.TriggerClientClosed(agentID, this);
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user