aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/BotManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-23 01:13:19 +0100
committerJustin Clark-Casey (justincc)2013-08-23 01:13:19 +0100
commit050617ae0ec13075db36449e8e5a4616c8bcd96e (patch)
tree31780c1fae386f07aac373a8c4a3ed1219cf5897 /OpenSim/Tools/pCampBot/BotManager.cs
parentremove redundant return at end of HandleDeregisterRegion() (diff)
downloadopensim-SC_OLD-050617ae0ec13075db36449e8e5a4616c8bcd96e.zip
opensim-SC_OLD-050617ae0ec13075db36449e8e5a4616c8bcd96e.tar.gz
opensim-SC_OLD-050617ae0ec13075db36449e8e5a4616c8bcd96e.tar.bz2
opensim-SC_OLD-050617ae0ec13075db36449e8e5a4616c8bcd96e.tar.xz
Make pCampbot "show bot" command take the bot number instead of the full bot name
Shorter and can do this because bot names are uniform
Diffstat (limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 50a77ed..5c3835b 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -212,7 +212,7 @@ namespace pCampBot
212 "bot", false, "show bots", "show bots", "Shows the status of all bots", HandleShowBotsStatus); 212 "bot", false, "show bots", "show bots", "Shows the status of all bots", HandleShowBotsStatus);
213 213
214 m_console.Commands.AddCommand( 214 m_console.Commands.AddCommand(
215 "bot", false, "show bot", "show bot <first-name> <last-name>", 215 "bot", false, "show bot", "show bot <n>",
216 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); 216 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus);
217 217
218 m_bots = new List<Bot>(); 218 m_bots = new List<Bot>();
@@ -605,13 +605,18 @@ namespace pCampBot
605 605
606 private void HandleShowBotStatus(string module, string[] cmd) 606 private void HandleShowBotStatus(string module, string[] cmd)
607 { 607 {
608 if (cmd.Length != 4) 608 if (cmd.Length != 3)
609 { 609 {
610 MainConsole.Instance.Output("Usage: show bot <first-name> <last-name>"); 610 MainConsole.Instance.Output("Usage: show bot <n>");
611 return; 611 return;
612 } 612 }
613 613
614 string name = string.Format("{0} {1}", cmd[2], cmd[3]); 614 int botNumber;
615
616 if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, cmd[2], out botNumber))
617 return;
618
619 string name = string.Format("{0} {1}_{2}", m_firstName, m_lastNameStem, botNumber);
615 620
616 Bot bot; 621 Bot bot;
617 622