As part of our "we aim to please" commitment, have added the ability to create a user in one command line: "create user firstname secondname passwrd regionX regionY". This allows the use of the "command-script" feature. So to add a bunch of new accounts, just create a text file, and add a line as above for each account. Then in the opensim console, type: "command-script filename".
parent
2b3b1faf6d
commit
31b895681a
|
@ -52,7 +52,7 @@ using OpenSim.Framework.Utilities;
|
||||||
|
|
||||||
namespace OpenSim
|
namespace OpenSim
|
||||||
{
|
{
|
||||||
public delegate void ConsoleCommand(string comParams);
|
public delegate void ConsoleCommand(string[] comParams);
|
||||||
|
|
||||||
public class OpenSimMain : RegionApplicationBase, conscmd_callback
|
public class OpenSimMain : RegionApplicationBase, conscmd_callback
|
||||||
{
|
{
|
||||||
|
@ -455,7 +455,7 @@ namespace OpenSim
|
||||||
case "create":
|
case "create":
|
||||||
if (CreateAccount != null)
|
if (CreateAccount != null)
|
||||||
{
|
{
|
||||||
CreateAccount(cmdparams[0]);
|
CreateAccount(cmdparams);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,9 @@ namespace OpenSim.Region.Communications.Local
|
||||||
this.InstanceServices.AddNewSession(regionHandle, login);
|
this.InstanceServices.AddNewSession(regionHandle, login);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doCreate(string what)
|
public void doCreate(string[] cmmdParams)
|
||||||
{
|
{
|
||||||
switch (what)
|
switch (cmmdParams[0])
|
||||||
{
|
{
|
||||||
case "user":
|
case "user":
|
||||||
string tempfirstname;
|
string tempfirstname;
|
||||||
|
@ -85,11 +85,24 @@ namespace OpenSim.Region.Communications.Local
|
||||||
uint regX = 1000;
|
uint regX = 1000;
|
||||||
uint regY = 1000;
|
uint regY = 1000;
|
||||||
|
|
||||||
|
if (cmmdParams.Length < 2)
|
||||||
|
{
|
||||||
|
|
||||||
tempfirstname = MainLog.Instance.CmdPrompt("First name", "Default");
|
tempfirstname = MainLog.Instance.CmdPrompt("First name", "Default");
|
||||||
templastname = MainLog.Instance.CmdPrompt("Last name", "User");
|
templastname = MainLog.Instance.CmdPrompt("Last name", "User");
|
||||||
tempMD5Passwd = MainLog.Instance.PasswdPrompt("Password");
|
tempMD5Passwd = MainLog.Instance.PasswdPrompt("Password");
|
||||||
regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000"));
|
regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000"));
|
||||||
regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000"));
|
regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempfirstname = cmmdParams[1];
|
||||||
|
templastname = cmmdParams[2];
|
||||||
|
tempMD5Passwd = cmmdParams[3];
|
||||||
|
regX = Convert.ToUInt32(cmmdParams[4]);
|
||||||
|
regY = Convert.ToUInt32(cmmdParams[5]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue