aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService
diff options
context:
space:
mode:
authoronefang2020-09-09 20:24:55 +1000
committeronefang2020-09-09 20:24:55 +1000
commitbdb365015b67d5b9b8646c97fc41047bb16f6175 (patch)
treefc656cc7ed3c386e61111c369cfb334b780c6ba4 /OpenSim/Services/LLLoginService
parentRemove various limits. (diff)
downloadopensim-SC-bdb365015b67d5b9b8646c97fc41047bb16f6175.zip
opensim-SC-bdb365015b67d5b9b8646c97fc41047bb16f6175.tar.gz
opensim-SC-bdb365015b67d5b9b8646c97fc41047bb16f6175.tar.bz2
opensim-SC-bdb365015b67d5b9b8646c97fc41047bb16f6175.tar.xz
Bandaid for ghost users, check and remove them from Presence when they log on.
Once again OOP proves it's worse that spaghetti, by cutting up the spaghetti and hiding it all over the kitchen. Note the commented out bits from GateKeeperService.cs, this stuff is checked TWICE, though this time is for HGers, or not.
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-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 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",