diff options
author | Sean Dague | 2008-02-26 20:26:48 +0000 |
---|---|---|
committer | Sean Dague | 2008-02-26 20:26:48 +0000 |
commit | b8e6d6e24547a1a15f7771884d07647c25e42e2f (patch) | |
tree | c9b888bdd0905e4bd5d8a15faa84d0b20b92f2df /OpenSim | |
parent | make trunk compile again. I think Adam forgot to check in some files (diff) | |
download | opensim-SC-b8e6d6e24547a1a15f7771884d07647c25e42e2f.zip opensim-SC-b8e6d6e24547a1a15f7771884d07647c25e42e2f.tar.gz opensim-SC-b8e6d6e24547a1a15f7771884d07647c25e42e2f.tar.bz2 opensim-SC-b8e6d6e24547a1a15f7771884d07647c25e42e2f.tar.xz |
give pCampBot a -h, -help option
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Tools/pCampBot/pCampBot.cs | 40 |
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 | } |