diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 1f3e7a1..ed14c12 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -925,6 +925,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
925 | 925 | ||
926 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) | 926 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
927 | { | 927 | { |
928 | if (!sp.Scene.IncomingPreCloseAgent(sp)) | ||
929 | return; | ||
930 | |||
928 | // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before | 931 | // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before |
929 | // they regard the new region as the current region after receiving the AgentMovementComplete | 932 | // they regard the new region as the current region after receiving the AgentMovementComplete |
930 | // response. If close is sent before then, it will cause the viewer to quit instead. | 933 | // response. If close is sent before then, it will cause the viewer to quit instead. |
@@ -1087,6 +1090,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1087 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | 1090 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone |
1088 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) | 1091 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
1089 | { | 1092 | { |
1093 | if (!sp.Scene.IncomingPreCloseAgent(sp)) | ||
1094 | return; | ||
1095 | |||
1090 | // RED ALERT!!!! | 1096 | // RED ALERT!!!! |
1091 | // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. | 1097 | // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. |
1092 | // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion | 1098 | // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion |
@@ -1100,6 +1106,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1100 | // then this will be handled in IncomingCloseAgent under lock conditions | 1106 | // then this will be handled in IncomingCloseAgent under lock conditions |
1101 | m_log.DebugFormat( | 1107 | m_log.DebugFormat( |
1102 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); | 1108 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); |
1109 | |||
1103 | sp.Scene.IncomingCloseAgent(sp.UUID, false); | 1110 | sp.Scene.IncomingCloseAgent(sp.UUID, false); |
1104 | } | 1111 | } |
1105 | else | 1112 | else |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 7adb203..8c983e6 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -481,14 +481,20 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
481 | 481 | ||
482 | public string GetUserUUI(UUID userID) | 482 | public string GetUserUUI(UUID userID) |
483 | { | 483 | { |
484 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, userID); | ||
485 | if (account != null) | ||
486 | return userID.ToString(); | ||
487 | |||
488 | UserData ud; | 484 | UserData ud; |
489 | lock (m_UserCache) | 485 | lock (m_UserCache) |
490 | m_UserCache.TryGetValue(userID, out ud); | 486 | m_UserCache.TryGetValue(userID, out ud); |
491 | 487 | ||
488 | if (ud == null) // It's not in the cache | ||
489 | { | ||
490 | string[] names = new string[2]; | ||
491 | // This will pull the data from either UserAccounts or GridUser | ||
492 | // and stick it into the cache | ||
493 | TryGetUserNamesFromServices(userID, names); | ||
494 | lock (m_UserCache) | ||
495 | m_UserCache.TryGetValue(userID, out ud); | ||
496 | } | ||
497 | |||
492 | if (ud != null) | 498 | if (ud != null) |
493 | { | 499 | { |
494 | string homeURL = ud.HomeURL; | 500 | string homeURL = ud.HomeURL; |