aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginModule.cs4
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginService.cs10
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs19
3 files changed, 28 insertions, 5 deletions
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
index 6474feb..9cfa3c1 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Client.Linden
54 protected bool m_enabled = false; // Module is only enabled if running in standalone mode 54 protected bool m_enabled = false; // Module is only enabled if running in standalone mode
55 55
56 protected bool authenticate; 56 protected bool authenticate;
57 protected bool m_warn_already_logged;
57 protected string welcomeMessage; 58 protected string welcomeMessage;
58 59
59 public bool RegionLoginsEnabled 60 public bool RegionLoginsEnabled
@@ -78,9 +79,11 @@ namespace OpenSim.Client.Linden
78 public void Initialise(IConfigSource source) 79 public void Initialise(IConfigSource source)
79 { 80 {
80 IConfig startupConfig = source.Configs["Startup"]; 81 IConfig startupConfig = source.Configs["Startup"];
82 IConfig stdaloneConfig = source.Configs["StandAlone"];
81 if (startupConfig != null) 83 if (startupConfig != null)
82 { 84 {
83 m_enabled = !startupConfig.GetBoolean("gridmode", false); 85 m_enabled = !startupConfig.GetBoolean("gridmode", false);
86 m_warn_already_logged = stdaloneConfig.GetBoolean("warn_user_already_logged_in", true);
84 } 87 }
85 88
86 if (m_enabled) 89 if (m_enabled)
@@ -112,6 +115,7 @@ namespace OpenSim.Client.Linden
112 115
113 //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference 116 //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
114 m_loginService = new LLStandaloneLoginService((UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this); 117 m_loginService = new LLStandaloneLoginService((UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this);
118 m_loginService.WarnAlreadyLogged = m_warn_already_logged;
115 119
116 httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 120 httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
117 121
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
index ea3a74a..d9af24d 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -52,6 +52,14 @@ namespace OpenSim.Client.Linden
52 protected NetworkServersInfo m_serversInfo; 52 protected NetworkServersInfo m_serversInfo;
53 protected bool m_authUsers = false; 53 protected bool m_authUsers = false;
54 54
55 // If true, warns the user that he is already logged, forcing another login.
56 // If false, skips message and logs in directly, kicking out current user.
57 public bool WarnAlreadyLogged
58 {
59 get { return m_warn_already_logged; }
60 set { m_warn_already_logged = value; }
61 }
62
55 /// <summary> 63 /// <summary>
56 /// Used to make requests to the local regions. 64 /// Used to make requests to the local regions.
57 /// </summary> 65 /// </summary>
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index 2847887..34d24cb 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -61,6 +61,8 @@ namespace OpenSim.Framework.Communications.Services
61 protected uint m_defaultHomeX; 61 protected uint m_defaultHomeX;
62 protected uint m_defaultHomeY; 62 protected uint m_defaultHomeY;
63 63
64 protected bool m_warn_already_logged = true;
65
64 /// <summary> 66 /// <summary>
65 /// Used by the login service to make requests to the inventory service. 67 /// Used by the login service to make requests to the inventory service.
66 /// </summary> 68 /// </summary>
@@ -181,11 +183,20 @@ namespace OpenSim.Framework.Communications.Services
181 183
182 // Reject the login 184 // Reject the login
183 185
184 m_log.InfoFormat( 186 if (m_warn_already_logged)
185 "[LOGIN END]: XMLRPC Notifying user {0} {1} that they are already logged in", 187 {
186 firstname, lastname); 188 m_log.InfoFormat(
189 "[LOGIN END]: XMLRPC Notifying user {0} {1} that they are already logged in",
190 firstname, lastname);
187 191
188 return logResponse.CreateAlreadyLoggedInResponse(); 192 return logResponse.CreateAlreadyLoggedInResponse();
193 }
194 else
195 {
196 m_log.InfoFormat(
197 "[LOGIN]: User {0} {1} is already logged in, not notifying user, kicking old presence and starting new login.",
198 firstname, lastname);
199 }
189 } 200 }
190 201
191 // Otherwise... 202 // Otherwise...