changes prompting of create user console command to only ask for unspecified parameters and avoid an exception if the wrong number of parameters are supplied
parent
c0af057588
commit
8465f378ac
|
@ -183,21 +183,25 @@ namespace OpenSim.Framework.Communications
|
||||||
uint regY = 1000;
|
uint regY = 1000;
|
||||||
|
|
||||||
if (cmmdParams.Length < 2)
|
if (cmmdParams.Length < 2)
|
||||||
{
|
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
|
||||||
|
else firstName = cmmdParams[1];
|
||||||
|
|
||||||
|
if ( cmmdParams.Length < 3 )
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
|
||||||
|
else lastName = cmmdParams[2];
|
||||||
|
|
||||||
|
if ( cmmdParams.Length < 4 )
|
||||||
password = MainConsole.Instance.PasswdPrompt("Password");
|
password = MainConsole.Instance.PasswdPrompt("Password");
|
||||||
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", "1000"));
|
else password = cmmdParams[3];
|
||||||
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", "1000"));
|
|
||||||
}
|
if ( cmmdParams.Length < 5 )
|
||||||
else
|
regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString()));
|
||||||
{
|
else regX = Convert.ToUInt32(cmmdParams[4]);
|
||||||
firstName = cmmdParams[1];
|
|
||||||
lastName = cmmdParams[2];
|
if ( cmmdParams.Length < 6 )
|
||||||
password = cmmdParams[3];
|
regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
|
||||||
regX = Convert.ToUInt32(cmmdParams[4]);
|
else regY = Convert.ToUInt32(cmmdParams[5]);
|
||||||
regY = Convert.ToUInt32(cmmdParams[5]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null == m_userService.GetUserProfile(firstName, lastName))
|
if (null == m_userService.GetUserProfile(firstName, lastName))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue