aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Tools/pCampBot/pCampBot.cs40
1 files changed, 30 insertions, 10 deletions
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs
index 704a3f5..b701d7d 100644
--- a/OpenSim/Tools/pCampBot/pCampBot.cs
+++ b/OpenSim/Tools/pCampBot/pCampBot.cs
@@ -55,22 +55,42 @@ namespace pCampBot
55 //Set up our nifty config.. thanks to nini 55 //Set up our nifty config.. thanks to nini
56 ArgvConfigSource cs = new ArgvConfigSource(args); 56 ArgvConfigSource cs = new ArgvConfigSource(args);
57 57
58 cs.AddSwitch("Startup", "botcount"); 58 cs.AddSwitch("Startup", "botcount","n");
59 cs.AddSwitch("Startup", "loginuri"); 59 cs.AddSwitch("Startup", "loginuri","l");
60 cs.AddSwitch("Startup", "firstname"); 60 cs.AddSwitch("Startup", "firstname");
61 cs.AddSwitch("Startup", "lastname"); 61 cs.AddSwitch("Startup", "lastname");
62 cs.AddSwitch("Startup", "password"); 62 cs.AddSwitch("Startup", "password");
63 cs.AddSwitch("Startup", "help","h");
63 64
64 IConfig ol = cs.Configs["Startup"]; 65 IConfig ol = cs.Configs["Startup"];
65 int botcount = ol.GetInt("botcount", 1); 66 if (ol.Get("help") != null) {
66 BotManager bm = new BotManager(); 67 Help();
67 68 } else {
68 //startup specified number of bots. 1 is the default 69 int botcount = ol.GetInt("botcount", 1);
69 bm.dobotStartup(botcount, ol); 70
70 while (true) 71 BotManager bm = new BotManager();
71 { 72
72 MainConsole.Instance.Prompt(); 73 //startup specified number of bots. 1 is the default
74 bm.dobotStartup(botcount, ol);
75 while (true)
76 {
77 MainConsole.Instance.Prompt();
78 }
73 } 79 }
74 } 80 }
81
82 public static void Help()
83 {
84 System.Console.WriteLine(
85 "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" +
86 "Spawns a set of bots to test an OpenSim region\n\n" +
87 " -l, -loginuri loginuri for sim to log into (required)\n" +
88 " -n, -botcount number of bots to start (default: 1)\n" +
89 " -firstname first name for the bot(s) (default: random string)\n" +
90 " -lastname lastname for the bot(s) (default: random string)\n" +
91 " -password password for the bots(s) (default: random string)\n" +
92 " -h, -help show this message"
93 );
94 }
75 } 95 }
76} 96}