*Fix for loginuri issue in MassTestClient

Sugilite
mingchen 2007-06-21 17:42:53 +00:00
parent 5498ce108e
commit fc3aa3e193
1 changed files with 20 additions and 13 deletions

View File

@ -8,15 +8,15 @@ namespace libsecondlife.TestClient
public class CommandLineArgumentsException : Exception public class CommandLineArgumentsException : Exception
{ {
} }
public class Program public class Program
{ {
private static void Usage() private static void Usage()
{ {
Console.WriteLine("Usage: " + Environment.NewLine + Console.WriteLine("Usage: " + Environment.NewLine +
"MassTestClient.exe --first \"firstname\" --last \"lastname\" --pass \"password\" --contact \"youremail\" [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri \"loginuri\"] [--masscommandfile \"filename\"]" + "MassTestClient.exe --first \"firstname\" --last \"lastname\" --pass \"password\" --contact \"youremail\" [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri] [--masscommandfile \"filename\"]" +
Environment.NewLine + Environment.NewLine + "MassTestClient.exe --loginfile \"filename\" --contact \"youremail\" [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri \"loginuri\"] [--masscommandfile \"filename\"]"); Environment.NewLine + Environment.NewLine + "MassTestClient.exe --loginfile \"filename\" --contact \"youremail\" [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri] [--masscommandfile \"filename\"]");
Console.ReadLine(); Console.ReadLine();
} }
@ -38,7 +38,7 @@ namespace libsecondlife.TestClient
curCommand++; curCommand++;
} }
} }
return givenCommands; return givenCommands;
} }
@ -52,8 +52,9 @@ namespace libsecondlife.TestClient
string masterName = String.Empty; string masterName = String.Empty;
LLUUID masterKey = LLUUID.Zero; LLUUID masterKey = LLUUID.Zero;
string file = String.Empty; string file = String.Empty;
string contact = String.Empty; string contact = String.Empty;
string loginURI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi"; string loginURI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi";
try try
{ {
if (arguments["masterkey"] != null) if (arguments["masterkey"] != null)
@ -71,9 +72,9 @@ namespace libsecondlife.TestClient
contact = arguments["contact"]; contact = arguments["contact"];
if (arguments["file"] != null) if (arguments["loginfile"] != null)
{ {
file = arguments["file"]; file = arguments["loginfile"];
// Loading names from a file // Loading names from a file
try try
@ -144,13 +145,18 @@ namespace libsecondlife.TestClient
return; return;
} }
if(arguments["loginuri"] != null) if (arguments["loginuri"] != null)
{ {
loginURI = arguments["loginuri"]; Console.WriteLine("Please enter a login uri. If you enter nothing, AGNI grid is assumed:");
string temp = Console.ReadLine();
if (temp.Trim().Length > 0)
{
loginURI = temp.Trim();
}
} }
List<string> massTestCommands = new List<string>(); List<string> massTestCommands = new List<string>();
if(arguments["masscommandfile"] != null) if (arguments["masscommandfile"] != null)
{ {
string massCommandFile = arguments["masscommandfile"]; string massCommandFile = arguments["masscommandfile"];
try try
@ -161,9 +167,9 @@ namespace libsecondlife.TestClient
while ((line = reader.ReadLine()) != null) while ((line = reader.ReadLine()) != null)
{ {
line = line.Trim(); line = line.Trim();
if(line.Length > 0) if (line.Length > 0)
{ {
massTestCommands.Add(line); massTestCommands.Add(line);
} }
@ -183,7 +189,7 @@ namespace libsecondlife.TestClient
Console.Clear(); Console.Clear();
massTestCommands = getMassTestCommands(); massTestCommands = getMassTestCommands();
} }
Console.Clear(); Console.Clear();
if (massTestCommands.Count == 0) if (massTestCommands.Count == 0)
{ {
@ -194,6 +200,7 @@ namespace libsecondlife.TestClient
Console.WriteLine("Detected " + massTestCommands.Count + " mass commands; MassTestClient operation will be used"); Console.WriteLine("Detected " + massTestCommands.Count + " mass commands; MassTestClient operation will be used");
} }
Console.WriteLine(loginURI);
foreach (LoginDetails a in accounts) foreach (LoginDetails a in accounts)
{ {
a.MasterName = masterName; a.MasterName = masterName;