TC-55 Adds check to login command, displays usage information instead of throwing an exception if no args are passed
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2365 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -150,6 +150,12 @@ namespace OpenMetaverse.TestClient
|
||||
/// <returns></returns>
|
||||
public TestClient Login(string[] args)
|
||||
{
|
||||
|
||||
if (args.Length < 3)
|
||||
{
|
||||
Console.WriteLine("Usage: login firstname lastname password [simname] [login server url]");
|
||||
return null;
|
||||
}
|
||||
LoginDetails account = new LoginDetails();
|
||||
account.FirstName = args[0];
|
||||
account.LastName = args[1];
|
||||
@@ -157,8 +163,10 @@ namespace OpenMetaverse.TestClient
|
||||
|
||||
if (args.Length > 3)
|
||||
account.StartLocation = NetworkManager.StartLocation(args[3], 128, 128, 40);
|
||||
|
||||
if (args.Length > 4)
|
||||
account.URI = args[4];
|
||||
if(args[4].StartsWith("http://"))
|
||||
account.URI = args[4];
|
||||
|
||||
return Login(account);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user