aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs25
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 53a3c2f..cad0988 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -390,7 +390,30 @@ namespace OpenSim.Services.LLLoginService
390 { 390 {
391 if(guinfo != null && guinfo.Online && guinfo.LastRegionID != UUID.Zero) 391 if(guinfo != null && guinfo.Online && guinfo.LastRegionID != UUID.Zero)
392 { 392 {
393 if(SendAgentGodKillToRegion(scopeID, account.PrincipalID, guinfo)) 393 // Also check Presence.UserID if RegionID == UUID.Zero, they are a ghost.
394 // Ghosting might be caused by failure to call PresenceService.LogoutAgent() on logout / crash / failed login.
395 // Might also need to double check if they are out hypergridding.
396
397 success = false;
398 if (m_PresenceService != null)
399 {
400 PresenceInfo pi = m_PresenceService.GetAgentByUser(account.PrincipalID);
401 if (null != pi)
402 {
403 Dictionary<string, object> pid = pi.ToKeyValuePairs();
404 if (pid["RegionID"].ToString() == UUID.Zero.ToString())
405 {
406 m_log.WarnFormat("[LLOGIN SERVICE]: Exorcising ghost avatar {0} {1}, session {2}, new session {3}.", firstName, lastName, pid["SessionID"], session);
407 success = m_PresenceService.LogoutAgent(new UUID(pid["SessionID"].ToString()));
408 if (success)
409 m_log.WarnFormat("[LLOGIN SERVICE]: Ghost avatar exorcised {0} {1}, session {2}, new session {3}.", firstName, lastName, pid["SessionID"], session);
410 else
411 m_log.ErrorFormat("[LLOGIN SERVICE]: Ghost avatar not exorcised {0} {1}, session {2}, new session {3}!", firstName, lastName, pid["SessionID"], session);
412 }
413 }
414 }
415
416 if ((!success) && SendAgentGodKillToRegion(scopeID, account.PrincipalID, guinfo))
394 { 417 {
395 m_log.InfoFormat( 418 m_log.InfoFormat(
396 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: already logged in", 419 "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: already logged in",