presence detector: don't even try to logout agents that didn't made to root
parent
5ed2b5c990
commit
0ebb1f3f4b
|
@ -50,7 +50,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
|||
public void AddRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
|
||||
m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID);
|
||||
|
||||
|
@ -61,7 +60,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
|||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent;
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
|
||||
m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID);
|
||||
}
|
||||
|
@ -71,6 +69,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
|||
if (sp.IsNPC)
|
||||
return;
|
||||
|
||||
sp.ControllingClient.OnConnectionClosed += OnConnectionClose;
|
||||
|
||||
if (sp.gotCrossUpdate)
|
||||
{
|
||||
Util.FireAndForget(delegate
|
||||
|
@ -89,11 +89,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
|
|||
m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID);
|
||||
}
|
||||
|
||||
public void OnNewClient(IClientAPI client)
|
||||
{
|
||||
client.OnConnectionClosed += OnConnectionClose;
|
||||
}
|
||||
|
||||
public void OnConnectionClose(IClientAPI client)
|
||||
{
|
||||
if (client != null && client.SceneAgent != null && !client.SceneAgent.IsChildAgent)
|
||||
|
|
Loading…
Reference in New Issue