diff options
Diffstat (limited to '')
-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; |