diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index e05d186..2238c90 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | |||
@@ -67,10 +67,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
67 | { | 67 | { |
68 | if (sp.PresenceType != PresenceType.Npc) | 68 | if (sp.PresenceType != PresenceType.Npc) |
69 | { | 69 | { |
70 | string userid = sp.Scene.UserManagementModule.GetUserUUI(sp.UUID); | 70 | string userid; |
71 | //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName); | 71 | //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", userid, sp.Scene.RegionInfo.RegionName); |
72 | m_GridUserService.SetLastPosition( | 72 | if (sp.Scene.UserManagementModule.GetUserUUI(sp.UUID, out userid)) |
73 | userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 73 | { |
74 | /* we only setposition on known agents that have a valid lookup */ | ||
75 | m_GridUserService.SetLastPosition( | ||
76 | userid, UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
77 | } | ||
74 | } | 78 | } |
75 | } | 79 | } |
76 | 80 | ||
@@ -89,17 +93,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
89 | if (client.SceneAgent.IsChildAgent) | 93 | if (client.SceneAgent.IsChildAgent) |
90 | return; | 94 | return; |
91 | 95 | ||
92 | string userId = client.AgentId.ToString(); | 96 | string userId; |
97 | /* without scene we cannot logout correctly at all since we do not know how to send the loggedout message then */ | ||
93 | if (client.Scene is Scene) | 98 | if (client.Scene is Scene) |
94 | { | 99 | { |
95 | Scene s = (Scene)client.Scene; | 100 | Scene s = (Scene)client.Scene; |
96 | userId = s.UserManagementModule.GetUserUUI(client.AgentId); | 101 | userId = s.UserManagementModule.GetUserUUI(client.AgentId); |
102 | if(s.UserManagementModule.GetUserUUI(client.AgentId, out userId)) | ||
103 | { | ||
104 | m_GridUserService.LoggedOut( | ||
105 | userId, client.SessionId, client.Scene.RegionInfo.RegionID, | ||
106 | client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); | ||
107 | } | ||
97 | } | 108 | } |
98 | //m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", userId, client.Scene.RegionInfo.RegionName); | ||
99 | 109 | ||
100 | m_GridUserService.LoggedOut( | ||
101 | userId, client.SessionId, client.Scene.RegionInfo.RegionID, | ||
102 | client.SceneAgent.AbsolutePosition, client.SceneAgent.Lookat); | ||
103 | } | 110 | } |
104 | } | 111 | } |
105 | } | 112 | } |