aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDan Lake2011-10-04 16:59:35 -0700
committerDan Lake2011-10-04 16:59:35 -0700
commit38d205502a83ed334d9827f43862579cec305639 (patch)
tree31358ac05557104e6e821309a9c68dd7b3151032
parentRemoved redundant IClientAPI calls from TreePopulatorModule. Removing tree ob... (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-38d205502a83ed334d9827f43862579cec305639.zip
opensim-SC-38d205502a83ed334d9827f43862579cec305639.tar.gz
opensim-SC-38d205502a83ed334d9827f43862579cec305639.tar.bz2
opensim-SC-38d205502a83ed334d9827f43862579cec305639.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs11
-rw-r--r--OpenSim/Services/Interfaces/IUserAccountService.cs4
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs19
-rw-r--r--bin/OpenSim.ini.example10
-rw-r--r--bin/OpenSimDefaults.ini7
6 files changed, 37 insertions, 18 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 08f3dc7..70b7d88 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -170,7 +170,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
170 { 170 {
171 foreach (string enabledMethod in enabledMethods.Split('|')) 171 foreach (string enabledMethod in enabledMethods.Split('|'))
172 { 172 {
173 m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod]); 173 m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod], false);
174 } 174 }
175 } 175 }
176 } 176 }
@@ -3115,7 +3115,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
3115 UserAccount account = userAccountService.GetUserAccount(scopeID, firstName, lastName); 3115 UserAccount account = userAccountService.GetUserAccount(scopeID, firstName, lastName);
3116 if (null == account) 3116 if (null == account)
3117 { 3117 {
3118 account = new UserAccount(scopeID, firstName, lastName, email); 3118 account = new UserAccount(scopeID, UUID.Random(), firstName, lastName, email);
3119 if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0)) 3119 if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
3120 { 3120 {
3121 account.ServiceURLs = new Dictionary<string, object>(); 3121 account.ServiceURLs = new Dictionary<string, object>();
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 866ba9a..a6b91a3 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -462,9 +462,18 @@ namespace OpenSim
462 string password = MainConsole.Instance.PasswdPrompt("Password"); 462 string password = MainConsole.Instance.PasswdPrompt("Password");
463 string email = MainConsole.Instance.CmdPrompt("Email", ""); 463 string email = MainConsole.Instance.CmdPrompt("Email", "");
464 464
465 string rawPrincipalId = MainConsole.Instance.CmdPrompt("ID", UUID.Random().ToString());
466
467 UUID principalId = UUID.Zero;
468 if (!UUID.TryParse(rawPrincipalId, out principalId))
469 {
470 m_log.ErrorFormat("[OPENSIM]: ID {0} is not a valid UUID", rawPrincipalId);
471 return;
472 }
473
465 account 474 account
466 = ((UserAccountService)scene.UserAccountService).CreateUser( 475 = ((UserAccountService)scene.UserAccountService).CreateUser(
467 regionInfo.ScopeID, first, last, password, email); 476 regionInfo.ScopeID, principalId, first, last, password, email);
468 } 477 }
469// } 478// }
470 } 479 }
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs
index 9c992e0..20414f6 100644
--- a/OpenSim/Services/Interfaces/IUserAccountService.cs
+++ b/OpenSim/Services/Interfaces/IUserAccountService.cs
@@ -44,9 +44,9 @@ namespace OpenSim.Services.Interfaces
44 PrincipalID = principalID; 44 PrincipalID = principalID;
45 } 45 }
46 46
47 public UserAccount(UUID scopeID, string firstName, string lastName, string email) 47 public UserAccount(UUID scopeID, UUID principalID, string firstName, string lastName, string email)
48 { 48 {
49 PrincipalID = UUID.Random(); 49 PrincipalID = principalID;
50 ScopeID = scopeID; 50 ScopeID = scopeID;
51 FirstName = firstName; 51 FirstName = firstName;
52 LastName = lastName; 52 LastName = lastName;
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index e071b94..923be7e 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Services.UserAccountService
93 { 93 {
94 MainConsole.Instance.Commands.AddCommand("UserService", false, 94 MainConsole.Instance.Commands.AddCommand("UserService", false,
95 "create user", 95 "create user",
96 "create user [<first> [<last> [<pass> [<email>]]]]", 96 "create user [<first> [<last> [<pass> [<email> [<user id>]]]]]",
97 "Create a new user", HandleCreateUser); 97 "Create a new user", HandleCreateUser);
98 98
99 MainConsole.Instance.Commands.AddCommand("UserService", false, 99 MainConsole.Instance.Commands.AddCommand("UserService", false,
@@ -321,6 +321,7 @@ namespace OpenSim.Services.UserAccountService
321 string lastName; 321 string lastName;
322 string password; 322 string password;
323 string email; 323 string email;
324 string rawPrincipalId;
324 325
325 List<char> excluded = new List<char>(new char[]{' '}); 326 List<char> excluded = new List<char>(new char[]{' '});
326 327
@@ -340,7 +341,16 @@ namespace OpenSim.Services.UserAccountService
340 email = MainConsole.Instance.CmdPrompt("Email", ""); 341 email = MainConsole.Instance.CmdPrompt("Email", "");
341 else email = cmdparams[5]; 342 else email = cmdparams[5];
342 343
343 CreateUser(UUID.Zero, firstName, lastName, password, email); 344 if (cmdparams.Length < 7)
345 rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
346 else
347 rawPrincipalId = cmdparams[6];
348
349 UUID principalId = UUID.Zero;
350 if (!UUID.TryParse(rawPrincipalId, out principalId))
351 throw new Exception(string.Format("ID {0} is not a valid UUID", rawPrincipalId));
352
353 CreateUser(UUID.Zero, principalId, firstName, lastName, password, email);
344 } 354 }
345 355
346 protected void HandleShowAccount(string module, string[] cmdparams) 356 protected void HandleShowAccount(string module, string[] cmdparams)
@@ -453,16 +463,17 @@ namespace OpenSim.Services.UserAccountService
453 /// Create a user 463 /// Create a user
454 /// </summary> 464 /// </summary>
455 /// <param name="scopeID">Allows hosting of multiple grids in a single database. Normally left as UUID.Zero</param> 465 /// <param name="scopeID">Allows hosting of multiple grids in a single database. Normally left as UUID.Zero</param>
466 /// <param name="principalID">ID of the user</param>
456 /// <param name="firstName"></param> 467 /// <param name="firstName"></param>
457 /// <param name="lastName"></param> 468 /// <param name="lastName"></param>
458 /// <param name="password"></param> 469 /// <param name="password"></param>
459 /// <param name="email"></param> 470 /// <param name="email"></param>
460 public UserAccount CreateUser(UUID scopeID, string firstName, string lastName, string password, string email) 471 public UserAccount CreateUser(UUID scopeID, UUID principalID, string firstName, string lastName, string password, string email)
461 { 472 {
462 UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); 473 UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
463 if (null == account) 474 if (null == account)
464 { 475 {
465 account = new UserAccount(UUID.Zero, firstName, lastName, email); 476 account = new UserAccount(UUID.Zero, principalID, firstName, lastName, email);
466 if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0)) 477 if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
467 { 478 {
468 account.ServiceURLs = new Dictionary<string, object>(); 479 account.ServiceURLs = new Dictionary<string, object>();
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index c3d3216..40612e9 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -223,11 +223,11 @@
223 ;; server to send mail through. 223 ;; server to send mail through.
224 ; emailmodule = DefaultEmailModule 224 ; emailmodule = DefaultEmailModule
225 225
226 ; Controls whether previously compiled scripts are deleted on sim restart. If you disable this 226 ;# {DeleteScriptsOnRestart} {} {Delete compiled script DLLs on restart?} (true false) true
227 ; then startup will be faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the 227 ;; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
228 ; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used 228 ;; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
229 ; by scripts have changed. 229 ;; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
230 ; Default is false 230 ;; by scripts have changed.
231 ; DeleteScriptsOnStartup = true 231 ; DeleteScriptsOnStartup = true
232 232
233 233
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index cd69e2a..c4f5592 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -1194,12 +1194,11 @@
1194 ;; Path to script assemblies 1194 ;; Path to script assemblies
1195 ; ScriptEnginesPath = "ScriptEngines" 1195 ; ScriptEnginesPath = "ScriptEngines"
1196 1196
1197 ; Controls whether previously compiled scripts are deleted on sim restart. If you disable this 1197 ; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
1198 ; then startup will be faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the 1198 ; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
1199 ; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used 1199 ; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
1200 ; by scripts have changed. 1200 ; by scripts have changed.
1201 ; Default is false 1201 ; DeleteScriptsOnStartup = false
1202 ; DeleteScriptsOnStartup = true
1203 1202
1204 1203
1205[OpenGridProtocol] 1204[OpenGridProtocol]