Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

remove-scene-viewer
Dan Lake 2011-10-04 16:59:35 -07:00
commit 38d205502a
6 changed files with 37 additions and 18 deletions

View File

@ -170,7 +170,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{ {
foreach (string enabledMethod in enabledMethods.Split('|')) foreach (string enabledMethod in enabledMethods.Split('|'))
{ {
m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod]); m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod], false);
} }
} }
} }
@ -3115,7 +3115,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
UserAccount account = userAccountService.GetUserAccount(scopeID, firstName, lastName); UserAccount account = userAccountService.GetUserAccount(scopeID, firstName, lastName);
if (null == account) if (null == account)
{ {
account = new UserAccount(scopeID, firstName, lastName, email); account = new UserAccount(scopeID, UUID.Random(), firstName, lastName, email);
if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0)) if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
{ {
account.ServiceURLs = new Dictionary<string, object>(); account.ServiceURLs = new Dictionary<string, object>();

View File

@ -462,9 +462,18 @@ namespace OpenSim
string password = MainConsole.Instance.PasswdPrompt("Password"); string password = MainConsole.Instance.PasswdPrompt("Password");
string email = MainConsole.Instance.CmdPrompt("Email", ""); string email = MainConsole.Instance.CmdPrompt("Email", "");
string rawPrincipalId = MainConsole.Instance.CmdPrompt("ID", UUID.Random().ToString());
UUID principalId = UUID.Zero;
if (!UUID.TryParse(rawPrincipalId, out principalId))
{
m_log.ErrorFormat("[OPENSIM]: ID {0} is not a valid UUID", rawPrincipalId);
return;
}
account account
= ((UserAccountService)scene.UserAccountService).CreateUser( = ((UserAccountService)scene.UserAccountService).CreateUser(
regionInfo.ScopeID, first, last, password, email); regionInfo.ScopeID, principalId, first, last, password, email);
} }
// } // }
} }

View File

@ -44,9 +44,9 @@ namespace OpenSim.Services.Interfaces
PrincipalID = principalID; PrincipalID = principalID;
} }
public UserAccount(UUID scopeID, string firstName, string lastName, string email) public UserAccount(UUID scopeID, UUID principalID, string firstName, string lastName, string email)
{ {
PrincipalID = UUID.Random(); PrincipalID = principalID;
ScopeID = scopeID; ScopeID = scopeID;
FirstName = firstName; FirstName = firstName;
LastName = lastName; LastName = lastName;

View File

@ -93,7 +93,7 @@ namespace OpenSim.Services.UserAccountService
{ {
MainConsole.Instance.Commands.AddCommand("UserService", false, MainConsole.Instance.Commands.AddCommand("UserService", false,
"create user", "create user",
"create user [<first> [<last> [<pass> [<email>]]]]", "create user [<first> [<last> [<pass> [<email> [<user id>]]]]]",
"Create a new user", HandleCreateUser); "Create a new user", HandleCreateUser);
MainConsole.Instance.Commands.AddCommand("UserService", false, MainConsole.Instance.Commands.AddCommand("UserService", false,
@ -321,6 +321,7 @@ namespace OpenSim.Services.UserAccountService
string lastName; string lastName;
string password; string password;
string email; string email;
string rawPrincipalId;
List<char> excluded = new List<char>(new char[]{' '}); List<char> excluded = new List<char>(new char[]{' '});
@ -340,7 +341,16 @@ namespace OpenSim.Services.UserAccountService
email = MainConsole.Instance.CmdPrompt("Email", ""); email = MainConsole.Instance.CmdPrompt("Email", "");
else email = cmdparams[5]; else email = cmdparams[5];
CreateUser(UUID.Zero, firstName, lastName, password, email); if (cmdparams.Length < 7)
rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
else
rawPrincipalId = cmdparams[6];
UUID principalId = UUID.Zero;
if (!UUID.TryParse(rawPrincipalId, out principalId))
throw new Exception(string.Format("ID {0} is not a valid UUID", rawPrincipalId));
CreateUser(UUID.Zero, principalId, firstName, lastName, password, email);
} }
protected void HandleShowAccount(string module, string[] cmdparams) protected void HandleShowAccount(string module, string[] cmdparams)
@ -453,16 +463,17 @@ namespace OpenSim.Services.UserAccountService
/// Create a user /// Create a user
/// </summary> /// </summary>
/// <param name="scopeID">Allows hosting of multiple grids in a single database. Normally left as UUID.Zero</param> /// <param name="scopeID">Allows hosting of multiple grids in a single database. Normally left as UUID.Zero</param>
/// <param name="principalID">ID of the user</param>
/// <param name="firstName"></param> /// <param name="firstName"></param>
/// <param name="lastName"></param> /// <param name="lastName"></param>
/// <param name="password"></param> /// <param name="password"></param>
/// <param name="email"></param> /// <param name="email"></param>
public UserAccount CreateUser(UUID scopeID, string firstName, string lastName, string password, string email) public UserAccount CreateUser(UUID scopeID, UUID principalID, string firstName, string lastName, string password, string email)
{ {
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
if (null == account) if (null == account)
{ {
account = new UserAccount(UUID.Zero, firstName, lastName, email); account = new UserAccount(UUID.Zero, principalID, firstName, lastName, email);
if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0)) if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0))
{ {
account.ServiceURLs = new Dictionary<string, object>(); account.ServiceURLs = new Dictionary<string, object>();

View File

@ -223,11 +223,11 @@
;; server to send mail through. ;; server to send mail through.
; emailmodule = DefaultEmailModule ; emailmodule = DefaultEmailModule
; Controls whether previously compiled scripts are deleted on sim restart. If you disable this ;# {DeleteScriptsOnRestart} {} {Delete compiled script DLLs on restart?} (true false) true
; then startup will be faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the ;; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used ;; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
; by scripts have changed. ;; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
; Default is false ;; by scripts have changed.
; DeleteScriptsOnStartup = true ; DeleteScriptsOnStartup = true

View File

@ -1194,12 +1194,11 @@
;; Path to script assemblies ;; Path to script assemblies
; ScriptEnginesPath = "ScriptEngines" ; ScriptEnginesPath = "ScriptEngines"
; Controls whether previously compiled scripts are deleted on sim restart. If you disable this ; Controls whether previously compiled scripts DLLs are deleted on sim restart. If you set this to false
; then startup will be faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the ; then startup will be considerably faster since scripts won't need to be recompiled. However, then it becomes your responsibility to delete the
; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used ; compiled scripts if you're recompiling OpenSim from source code and internal interfaces used
; by scripts have changed. ; by scripts have changed.
; Default is false ; DeleteScriptsOnStartup = false
; DeleteScriptsOnStartup = true
[OpenGridProtocol] [OpenGridProtocol]