diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 172bea1..50c252c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -69,7 +69,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
69 | public void OnMakeRootAgent(ScenePresence sp) | 69 | public void OnMakeRootAgent(ScenePresence sp) |
70 | { | 70 | { |
71 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | 71 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); |
72 | m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID); | 72 | if (sp.PresenceType != PresenceType.Npc) |
73 | m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID); | ||
73 | } | 74 | } |
74 | 75 | ||
75 | public void OnNewClient(IClientAPI client) | 76 | public void OnNewClient(IClientAPI client) |
@@ -79,7 +80,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
79 | 80 | ||
80 | public void OnConnectionClose(IClientAPI client) | 81 | public void OnConnectionClose(IClientAPI client) |
81 | { | 82 | { |
82 | if (!client.SceneAgent.IsChildAgent) | 83 | if (client != null && client.SceneAgent != null && !client.SceneAgent.IsChildAgent) |
83 | { | 84 | { |
84 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 85 | // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
85 | m_PresenceService.LogoutAgent(client.SessionId); | 86 | m_PresenceService.LogoutAgent(client.SessionId); |