diff options
author | Arthur Valadares | 2009-05-29 22:38:18 +0000 |
---|---|---|
committer | Arthur Valadares | 2009-05-29 22:38:18 +0000 |
commit | d0084f08f2d2d591706242227b2825a1e82e902e (patch) | |
tree | 7a3b8ad159568ccf3fda09a25c52bbd92071ef89 | |
parent | * Bug fix: Fixes an exception when Scene.RemoveClient is called to remove on a (diff) | |
download | opensim-SC-d0084f08f2d2d591706242227b2825a1e82e902e.zip opensim-SC-d0084f08f2d2d591706242227b2825a1e82e902e.tar.gz opensim-SC-d0084f08f2d2d591706242227b2825a1e82e902e.tar.bz2 opensim-SC-d0084f08f2d2d591706242227b2825a1e82e902e.tar.xz |
* Allows standalone region users to skip the "You must wait 5 minutes to log again" message and
allow the region to kick the old user and log the new one without reporting any failure.
Default is still to show message and fail login
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Client/Linden/LLStandaloneLoginModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Client/Linden/LLStandaloneLoginService.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Services/LoginService.cs | 19 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 4 |
4 files changed, 32 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... |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index cae87ee..b47d207 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -256,6 +256,10 @@ | |||
256 | accounts_authenticate = true | 256 | accounts_authenticate = true |
257 | welcome_message = "Welcome to OpenSimulator" | 257 | welcome_message = "Welcome to OpenSimulator" |
258 | 258 | ||
259 | ; Shows or skips the "please wait 5 minutes" message when you crash or are already logged in. | ||
260 | ; If false, it will silently kick the user from the scene and login. | ||
261 | warn_user_already_logged_in = true | ||
262 | |||
259 | ; Inventory database provider | 263 | ; Inventory database provider |
260 | inventory_plugin = "OpenSim.Data.SQLite.dll" | 264 | inventory_plugin = "OpenSim.Data.SQLite.dll" |
261 | ; inventory_plugin = "OpenSim.Data.MySQL.dll" | 265 | ; inventory_plugin = "OpenSim.Data.MySQL.dll" |