diff options
author | Diva Canto | 2011-06-07 12:10:57 -0700 |
---|---|---|
committer | Diva Canto | 2011-06-07 12:10:57 -0700 |
commit | 02b40670be7d6c42de7235285f2e136aa6109fd3 (patch) | |
tree | 9ecdc796955929373c3c34f1eeaab91ebbfd9549 /OpenSim/Region/Framework/Scenes | |
parent | Remove scary error message (diff) | |
download | opensim-SC_OLD-02b40670be7d6c42de7235285f2e136aa6109fd3.zip opensim-SC_OLD-02b40670be7d6c42de7235285f2e136aa6109fd3.tar.gz opensim-SC_OLD-02b40670be7d6c42de7235285f2e136aa6109fd3.tar.bz2 opensim-SC_OLD-02b40670be7d6c42de7235285f2e136aa6109fd3.tar.xz |
This makes the display names work better for foreigners
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 77301d8..588d627 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2571,12 +2571,38 @@ namespace OpenSim.Region.Framework.Scenes | |||
2571 | if (GetScenePresence(client.AgentId) != null) | 2571 | if (GetScenePresence(client.AgentId) != null) |
2572 | { | 2572 | { |
2573 | m_LastLogin = Util.EnvironmentTickCount(); | 2573 | m_LastLogin = Util.EnvironmentTickCount(); |
2574 | |||
2575 | // Cache the user's name | ||
2576 | CacheUserName(aCircuit); | ||
2577 | |||
2574 | EventManager.TriggerOnNewClient(client); | 2578 | EventManager.TriggerOnNewClient(client); |
2575 | if (vialogin) | 2579 | if (vialogin) |
2576 | EventManager.TriggerOnClientLogin(client); | 2580 | EventManager.TriggerOnClientLogin(client); |
2577 | } | 2581 | } |
2578 | } | 2582 | } |
2579 | 2583 | ||
2584 | private void CacheUserName(AgentCircuitData aCircuit) | ||
2585 | { | ||
2586 | IUserManagement uMan = RequestModuleInterface<IUserManagement>(); | ||
2587 | if (uMan != null) | ||
2588 | { | ||
2589 | string homeURL = string.Empty; | ||
2590 | string first = aCircuit.firstname, last = aCircuit.lastname; | ||
2591 | if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) | ||
2592 | homeURL = aCircuit.ServiceURLs["HomeURI"].ToString(); | ||
2593 | if (aCircuit.lastname.StartsWith("@")) | ||
2594 | { | ||
2595 | string[] parts = aCircuit.firstname.Split('.'); | ||
2596 | if (parts.Length >= 2) | ||
2597 | { | ||
2598 | first = parts[0]; | ||
2599 | last = parts[1]; | ||
2600 | } | ||
2601 | } | ||
2602 | uMan.AddUser(aCircuit.AgentID, first, last, homeURL); | ||
2603 | } | ||
2604 | } | ||
2605 | |||
2580 | private bool VerifyClient(AgentCircuitData aCircuit, System.Net.IPEndPoint ep, out bool vialogin) | 2606 | private bool VerifyClient(AgentCircuitData aCircuit, System.Net.IPEndPoint ep, out bool vialogin) |
2581 | { | 2607 | { |
2582 | vialogin = false; | 2608 | vialogin = false; |