diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 49 |
1 files changed, 35 insertions, 14 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 6f92388..d4f89d9 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -37,24 +37,26 @@ namespace OpenSim.Services.LLLoginService | |||
37 | private bool m_RequireInventory; | 37 | private bool m_RequireInventory; |
38 | private int m_MinLoginLevel; | 38 | private int m_MinLoginLevel; |
39 | 39 | ||
40 | IConfig m_LoginServerConfig; | ||
41 | |||
40 | public LLLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService) | 42 | public LLLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService) |
41 | { | 43 | { |
42 | IConfig serverConfig = config.Configs["LoginService"]; | 44 | m_LoginServerConfig = config.Configs["LoginService"]; |
43 | if (serverConfig == null) | 45 | if (m_LoginServerConfig == null) |
44 | throw new Exception(String.Format("No section LoginService in config file")); | 46 | throw new Exception(String.Format("No section LoginService in config file")); |
45 | 47 | ||
46 | string accountService = serverConfig.GetString("UserAccountService", String.Empty); | 48 | string accountService = m_LoginServerConfig.GetString("UserAccountService", String.Empty); |
47 | string authService = serverConfig.GetString("AuthenticationService", String.Empty); | 49 | string authService = m_LoginServerConfig.GetString("AuthenticationService", String.Empty); |
48 | string invService = serverConfig.GetString("InventoryService", String.Empty); | 50 | string invService = m_LoginServerConfig.GetString("InventoryService", String.Empty); |
49 | string gridService = serverConfig.GetString("GridService", String.Empty); | 51 | string gridService = m_LoginServerConfig.GetString("GridService", String.Empty); |
50 | string presenceService = serverConfig.GetString("PresenceService", String.Empty); | 52 | string presenceService = m_LoginServerConfig.GetString("PresenceService", String.Empty); |
51 | string libService = serverConfig.GetString("LibraryService", String.Empty); | 53 | string libService = m_LoginServerConfig.GetString("LibraryService", String.Empty); |
52 | string avatarService = serverConfig.GetString("AvatarService", String.Empty); | 54 | string avatarService = m_LoginServerConfig.GetString("AvatarService", String.Empty); |
53 | string simulationService = serverConfig.GetString("SimulationService", String.Empty); | 55 | string simulationService = m_LoginServerConfig.GetString("SimulationService", String.Empty); |
54 | 56 | ||
55 | m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty); | 57 | m_DefaultRegionName = m_LoginServerConfig.GetString("DefaultRegion", String.Empty); |
56 | m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); | 58 | m_WelcomeMessage = m_LoginServerConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); |
57 | m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); | 59 | m_RequireInventory = m_LoginServerConfig.GetBoolean("RequireInventory", true); |
58 | 60 | ||
59 | // These are required; the others aren't | 61 | // These are required; the others aren't |
60 | if (accountService == string.Empty || authService == string.Empty) | 62 | if (accountService == string.Empty || authService == string.Empty) |
@@ -438,7 +440,7 @@ namespace OpenSim.Services.LLLoginService | |||
438 | aCircuit.SecureSessionID = secureSession; | 440 | aCircuit.SecureSessionID = secureSession; |
439 | aCircuit.SessionID = session; | 441 | aCircuit.SessionID = session; |
440 | aCircuit.startpos = position; | 442 | aCircuit.startpos = position; |
441 | aCircuit.ServiceURLs = account.ServiceURLs; | 443 | SetServiceURLs(aCircuit, account); |
442 | 444 | ||
443 | if (simConnector.CreateAgent(region, aCircuit, 0, out reason)) | 445 | if (simConnector.CreateAgent(region, aCircuit, 0, out reason)) |
444 | return aCircuit; | 446 | return aCircuit; |
@@ -447,6 +449,25 @@ namespace OpenSim.Services.LLLoginService | |||
447 | 449 | ||
448 | } | 450 | } |
449 | 451 | ||
452 | private void SetServiceURLs(AgentCircuitData aCircuit, UserAccount account) | ||
453 | { | ||
454 | aCircuit.ServiceURLs = new Dictionary<string, object>(); | ||
455 | if (account.ServiceURLs == null) | ||
456 | return; | ||
457 | |||
458 | foreach (KeyValuePair<string, object> kvp in account.ServiceURLs) | ||
459 | { | ||
460 | if (kvp.Value == null || (kvp.Value != null && kvp.Value.ToString() == string.Empty)) | ||
461 | { | ||
462 | aCircuit.ServiceURLs[kvp.Key] = m_LoginServerConfig.GetString(kvp.Key, string.Empty); | ||
463 | } | ||
464 | else | ||
465 | { | ||
466 | aCircuit.ServiceURLs[kvp.Key] = kvp.Value; | ||
467 | } | ||
468 | } | ||
469 | } | ||
470 | |||
450 | #region Console Commands | 471 | #region Console Commands |
451 | private void RegisterCommands() | 472 | private void RegisterCommands() |
452 | { | 473 | { |