diff options
3 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs index 9259a83..9d36aa5 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement.Tests | |||
46 | public void TestCachedUserNameForNewAgent() | 46 | public void TestCachedUserNameForNewAgent() |
47 | { | 47 | { |
48 | TestHelpers.InMethod(); | 48 | TestHelpers.InMethod(); |
49 | TestHelpers.EnableLogging(); | 49 | // TestHelpers.EnableLogging(); |
50 | 50 | ||
51 | HGUserManagementModule hgumm = new HGUserManagementModule(); | 51 | HGUserManagementModule hgumm = new HGUserManagementModule(); |
52 | UUID userId = TestHelpers.ParseStem("11"); | 52 | UUID userId = TestHelpers.ParseStem("11"); |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index a720d7b..1e70b84 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -320,7 +320,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
320 | else | 320 | else |
321 | { | 321 | { |
322 | names[0] = "Unknown"; | 322 | names[0] = "Unknown"; |
323 | names[1] = "UserUMMTGUN"; | 323 | names[1] = "UserUMMTGUN2"; |
324 | 324 | ||
325 | return false; | 325 | return false; |
326 | } | 326 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8fe9b66..5dea634 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2847,7 +2847,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2847 | // client is for a root or child agent. | 2847 | // client is for a root or child agent. |
2848 | client.SceneAgent = sp; | 2848 | client.SceneAgent = sp; |
2849 | 2849 | ||
2850 | // Cache the user's name | 2850 | // This is currently also being done earlier in NewUserConnection for real users to see if this |
2851 | // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other | ||
2852 | // places. However, we still need to do it here for NPCs. | ||
2851 | CacheUserName(sp, aCircuit); | 2853 | CacheUserName(sp, aCircuit); |
2852 | 2854 | ||
2853 | EventManager.TriggerOnNewClient(client); | 2855 | EventManager.TriggerOnNewClient(client); |
@@ -2871,7 +2873,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2871 | { | 2873 | { |
2872 | string first = aCircuit.firstname, last = aCircuit.lastname; | 2874 | string first = aCircuit.firstname, last = aCircuit.lastname; |
2873 | 2875 | ||
2874 | if (sp.PresenceType == PresenceType.Npc) | 2876 | if (sp != null && sp.PresenceType == PresenceType.Npc) |
2875 | { | 2877 | { |
2876 | UserManagementModule.AddUser(aCircuit.AgentID, first, last); | 2878 | UserManagementModule.AddUser(aCircuit.AgentID, first, last); |
2877 | } | 2879 | } |
@@ -3766,8 +3768,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3766 | CapsModule.SetAgentCapsSeeds(agent); | 3768 | CapsModule.SetAgentCapsSeeds(agent); |
3767 | } | 3769 | } |
3768 | } | 3770 | } |
3769 | } | ||
3770 | 3771 | ||
3772 | // Try caching an incoming user name much earlier on to see if this helps with an issue | ||
3773 | // where HG users are occasionally seen by others as "Unknown User" because their UUIDName | ||
3774 | // request for the HG avatar appears to trigger before the user name is cached. | ||
3775 | CacheUserName(null, agent); | ||
3776 | } | ||
3771 | 3777 | ||
3772 | if (vialogin) | 3778 | if (vialogin) |
3773 | { | 3779 | { |