diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mass test client/Program.cs | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/tools/mass test client/Program.cs b/tools/mass test client/Program.cs index 6274011..bc30a1c 100644 --- a/tools/mass test client/Program.cs +++ b/tools/mass test client/Program.cs | |||
@@ -8,15 +8,15 @@ namespace libsecondlife.TestClient | |||
8 | public class CommandLineArgumentsException : Exception | 8 | public class CommandLineArgumentsException : Exception |
9 | { | 9 | { |
10 | } | 10 | } |
11 | 11 | ||
12 | public class Program | 12 | public class Program |
13 | { | 13 | { |
14 | 14 | ||
15 | private static void Usage() | 15 | private static void Usage() |
16 | { | 16 | { |
17 | Console.WriteLine("Usage: " + Environment.NewLine + | 17 | Console.WriteLine("Usage: " + Environment.NewLine + |
18 | "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\"]" + | 18 | "MassTestClient.exe --first \"firstname\" --last \"lastname\" --pass \"password\" --contact \"youremail\" [--startpos \"sim/x/y/z\"] [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri] [--masscommandfile \"filename\"]" + |
19 | Environment.NewLine + Environment.NewLine + "MassTestClient.exe --loginfile \"filename\" --contact \"youremail\" [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri \"loginuri\"] [--masscommandfile \"filename\"]"); | 19 | Environment.NewLine + Environment.NewLine + "MassTestClient.exe --loginfile \"filename\" --contact \"youremail\" [--master \"master name\"] [--masterkey \"master uuid\"] [--loginuri] [--masscommandfile \"filename\"]"); |
20 | Console.ReadLine(); | 20 | Console.ReadLine(); |
21 | } | 21 | } |
22 | 22 | ||
@@ -38,7 +38,7 @@ namespace libsecondlife.TestClient | |||
38 | curCommand++; | 38 | curCommand++; |
39 | } | 39 | } |
40 | } | 40 | } |
41 | 41 | ||
42 | return givenCommands; | 42 | return givenCommands; |
43 | } | 43 | } |
44 | 44 | ||
@@ -52,8 +52,9 @@ namespace libsecondlife.TestClient | |||
52 | string masterName = String.Empty; | 52 | string masterName = String.Empty; |
53 | LLUUID masterKey = LLUUID.Zero; | 53 | LLUUID masterKey = LLUUID.Zero; |
54 | string file = String.Empty; | 54 | string file = String.Empty; |
55 | string contact = String.Empty; | 55 | string contact = String.Empty; |
56 | string loginURI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi"; | 56 | string loginURI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi"; |
57 | |||
57 | try | 58 | try |
58 | { | 59 | { |
59 | if (arguments["masterkey"] != null) | 60 | if (arguments["masterkey"] != null) |
@@ -71,9 +72,9 @@ namespace libsecondlife.TestClient | |||
71 | 72 | ||
72 | contact = arguments["contact"]; | 73 | contact = arguments["contact"]; |
73 | 74 | ||
74 | if (arguments["file"] != null) | 75 | if (arguments["loginfile"] != null) |
75 | { | 76 | { |
76 | file = arguments["file"]; | 77 | file = arguments["loginfile"]; |
77 | 78 | ||
78 | // Loading names from a file | 79 | // Loading names from a file |
79 | try | 80 | try |
@@ -144,13 +145,18 @@ namespace libsecondlife.TestClient | |||
144 | return; | 145 | return; |
145 | } | 146 | } |
146 | 147 | ||
147 | if(arguments["loginuri"] != null) | 148 | if (arguments["loginuri"] != null) |
148 | { | 149 | { |
149 | loginURI = arguments["loginuri"]; | 150 | Console.WriteLine("Please enter a login uri. If you enter nothing, AGNI grid is assumed:"); |
151 | string temp = Console.ReadLine(); | ||
152 | if (temp.Trim().Length > 0) | ||
153 | { | ||
154 | loginURI = temp.Trim(); | ||
155 | } | ||
150 | } | 156 | } |
151 | 157 | ||
152 | List<string> massTestCommands = new List<string>(); | 158 | List<string> massTestCommands = new List<string>(); |
153 | if(arguments["masscommandfile"] != null) | 159 | if (arguments["masscommandfile"] != null) |
154 | { | 160 | { |
155 | string massCommandFile = arguments["masscommandfile"]; | 161 | string massCommandFile = arguments["masscommandfile"]; |
156 | try | 162 | try |
@@ -161,9 +167,9 @@ namespace libsecondlife.TestClient | |||
161 | 167 | ||
162 | while ((line = reader.ReadLine()) != null) | 168 | while ((line = reader.ReadLine()) != null) |
163 | { | 169 | { |
164 | 170 | ||
165 | line = line.Trim(); | 171 | line = line.Trim(); |
166 | if(line.Length > 0) | 172 | if (line.Length > 0) |
167 | { | 173 | { |
168 | massTestCommands.Add(line); | 174 | massTestCommands.Add(line); |
169 | } | 175 | } |
@@ -183,7 +189,7 @@ namespace libsecondlife.TestClient | |||
183 | Console.Clear(); | 189 | Console.Clear(); |
184 | massTestCommands = getMassTestCommands(); | 190 | massTestCommands = getMassTestCommands(); |
185 | } | 191 | } |
186 | 192 | ||
187 | Console.Clear(); | 193 | Console.Clear(); |
188 | if (massTestCommands.Count == 0) | 194 | if (massTestCommands.Count == 0) |
189 | { | 195 | { |
@@ -194,6 +200,7 @@ namespace libsecondlife.TestClient | |||
194 | Console.WriteLine("Detected " + massTestCommands.Count + " mass commands; MassTestClient operation will be used"); | 200 | Console.WriteLine("Detected " + massTestCommands.Count + " mass commands; MassTestClient operation will be used"); |
195 | } | 201 | } |
196 | 202 | ||
203 | Console.WriteLine(loginURI); | ||
197 | foreach (LoginDetails a in accounts) | 204 | foreach (LoginDetails a in accounts) |
198 | { | 205 | { |
199 | a.MasterName = masterName; | 206 | a.MasterName = masterName; |