diff options
author | onefang | 2019-08-15 02:18:35 +1000 |
---|---|---|
committer | onefang | 2019-08-15 02:18:35 +1000 |
commit | 7aecb3c7d9262b7dcd43b45736bb008a2f1ca742 (patch) | |
tree | 07678230038d535631906371a61cc1478f06cc26 /OpenSim/Services/LLLoginService/LLLoginService.cs | |
parent | Reload splash page every couple of minutes, to get fresh stats. (diff) | |
download | opensim-SC-7aecb3c7d9262b7dcd43b45736bb008a2f1ca742.zip opensim-SC-7aecb3c7d9262b7dcd43b45736bb008a2f1ca742.tar.gz opensim-SC-7aecb3c7d9262b7dcd43b45736bb008a2f1ca742.tar.bz2 opensim-SC-7aecb3c7d9262b7dcd43b45736bb008a2f1ca742.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, but 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 '')
-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 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", |