diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index e7816c2..7aa18b1 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -412,7 +412,30 @@ namespace OpenSim.Services.LLLoginService | |||
412 | { | 412 | { |
413 | if(guinfo != null && guinfo.Online && guinfo.LastRegionID != UUID.Zero) | 413 | if(guinfo != null && guinfo.Online && guinfo.LastRegionID != UUID.Zero) |
414 | { | 414 | { |
415 | if(SendAgentGodKillToRegion(scopeID, account.PrincipalID, guinfo)) | 415 | // Also check Presence.UserID if RegionID == UUID.Zero, they are a ghost. |
416 | // Ghosting might be caused by failure to call PresenceService.LogoutAgent() on logout / crash / failed login. | ||
417 | // Might also need to double check if they are out hypergridding. | ||
418 | |||
419 | success = false; | ||
420 | if (m_PresenceService != null) | ||
421 | { | ||
422 | PresenceInfo pi = m_PresenceService.GetAgentByUser(account.PrincipalID); | ||
423 | if (null != pi) | ||
424 | { | ||
425 | Dictionary<string, object> pid = pi.ToKeyValuePairs(); | ||
426 | if (pid["RegionID"].ToString() == UUID.Zero.ToString()) | ||
427 | { | ||
428 | m_log.WarnFormat("[LLOGIN SERVICE]: Exorcising ghost avatar {0} {1}, session {2}, new session {3}.", firstName, lastName, pid["SessionID"], session); | ||
429 | success = m_PresenceService.LogoutAgent(new UUID(pid["SessionID"].ToString())); | ||
430 | if (success) | ||
431 | m_log.WarnFormat("[LLOGIN SERVICE]: Ghost avatar exorcised {0} {1}, session {2}, new session {3}.", firstName, lastName, pid["SessionID"], session); | ||
432 | else | ||
433 | m_log.ErrorFormat("[LLOGIN SERVICE]: Ghost avatar not exorcised {0} {1}, session {2}, new session {3}!", firstName, lastName, pid["SessionID"], session); | ||
434 | } | ||
435 | } | ||
436 | } | ||
437 | |||
438 | if ((!success) && SendAgentGodKillToRegion(scopeID, account.PrincipalID, guinfo)) | ||
416 | { | 439 | { |
417 | m_log.InfoFormat( | 440 | m_log.InfoFormat( |
418 | "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: already logged in", | 441 | "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: already logged in", |