mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +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:
@@ -382,7 +382,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
client.OnLogout += OnLogout;
|
||||
}
|
||||
|
||||
private void ClientClosed(UUID AgentId)
|
||||
private void ClientClosed(UUID AgentId, Scene scene)
|
||||
{
|
||||
// agent's client was closed. As we handle logout in OnLogout, this here has only to handle
|
||||
// TPing away (root agent is closed) or TPing/crossing in a region far enough away (client
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
|
||||
remote_client.SendGroupNameReply(groupUUID, groupnamereply);
|
||||
}
|
||||
|
||||
private void OnClientClosed(UUID agentID)
|
||||
private void OnClientClosed(UUID agentID, Scene scene)
|
||||
{
|
||||
lock (m_ClientMap)
|
||||
{
|
||||
|
||||
@@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ClientLoggedOut(UUID agentID)
|
||||
public void ClientLoggedOut(UUID agentID, Scene scene)
|
||||
{
|
||||
if (m_AgentRegions.ContainsKey(agentID))
|
||||
m_AgentRegions.Remove(agentID);
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
||||
// ClientClosed(client.AgentId);
|
||||
// }
|
||||
|
||||
private void ClientClosed(UUID AgentID)
|
||||
private void ClientClosed(UUID AgentID, Scene scene)
|
||||
{
|
||||
m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName);
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
/// Event handler
|
||||
/// </summary>
|
||||
/// <param name="AgentId">AgentID that logged out</param>
|
||||
private void ClientLoggedOut(UUID AgentId)
|
||||
private void ClientLoggedOut(UUID AgentId, Scene scene)
|
||||
{
|
||||
List<ScenePresence> presences = m_scene.GetAvatars();
|
||||
int rootcount = 0;
|
||||
|
||||
Reference in New Issue
Block a user