TestClient cleanup

This commit is contained in:
Cinder
2022-02-25 19:38:11 -06:00
parent 3fe7b935e7
commit 781a63c307
84 changed files with 385 additions and 408 deletions

View File

@@ -30,12 +30,12 @@ namespace OpenMetaverse.TestClient
List<LoginDetails> accounts = new List<LoginDetails>();
LoginDetails account;
bool groupCommands = false;
string masterName = String.Empty;
string masterName = string.Empty;
UUID masterKey = UUID.Zero;
string file = String.Empty;
string file = string.Empty;
bool getTextures = false;
bool noGUI = false; // true if to not prompt for input
string scriptFile = String.Empty;
string scriptFile = string.Empty;
if (arguments["groupcommands"] != null)
groupCommands = true;
@@ -48,7 +48,7 @@ namespace OpenMetaverse.TestClient
if (arguments["loginuri"] != null)
LoginURI = arguments["loginuri"];
if (String.IsNullOrEmpty(LoginURI))
if (string.IsNullOrEmpty(LoginURI))
LoginURI = Settings.AGNI_LOGIN_SERVER;
Logger.Log("Using login URI " + LoginURI, Helpers.LogLevel.Info);
@@ -89,7 +89,7 @@ namespace OpenMetaverse.TestClient
while ((line = reader.ReadLine()) != null)
{
lineNumber++;
string[] tokens = line.Trim().Split(new char[] {' ', ','});
string[] tokens = line.Trim().Split(' ', ',');
if (tokens.Length >= 3)
{
@@ -105,8 +105,8 @@ namespace OpenMetaverse.TestClient
char sep = '/';
string[] startbits = tokens[3].Split(sep);
account.StartLocation = NetworkManager.StartLocation(startbits[0],
Int32.Parse(startbits[1]),
Int32.Parse(startbits[2]), Int32.Parse(startbits[3]));
int.Parse(startbits[1]),
int.Parse(startbits[2]), int.Parse(startbits[3]));
}
accounts.Add(account);
@@ -155,15 +155,15 @@ namespace OpenMetaverse.TestClient
{
char sep = '/';
string[] startbits = arguments["startpos"].Split(sep);
a.StartLocation = NetworkManager.StartLocation(startbits[0], Int32.Parse(startbits[1]),
Int32.Parse(startbits[2]), Int32.Parse(startbits[3]));
a.StartLocation = NetworkManager.StartLocation(startbits[0], int.Parse(startbits[1]),
int.Parse(startbits[2]), int.Parse(startbits[3]));
}
}
// Login the accounts and run the input loop
ClientManager.Instance.Start(accounts, getTextures);
if (!String.IsNullOrEmpty(scriptFile))
if (!string.IsNullOrEmpty(scriptFile))
ClientManager.Instance.DoCommandAll("script " + scriptFile, UUID.Zero);
// Then Run the ClientManager normally