From 803fa36b682241835602085f7f87105611b9e05d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Aug 2013 01:13:19 +0100 Subject: 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 --- OpenSim/Tools/pCampBot/BotManager.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim') 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 "bot", false, "show bots", "show bots", "Shows the status of all bots", HandleShowBotsStatus); m_console.Commands.AddCommand( - "bot", false, "show bot", "show bot ", + "bot", false, "show bot", "show bot ", "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); m_bots = new List(); @@ -605,13 +605,18 @@ namespace pCampBot private void HandleShowBotStatus(string module, string[] cmd) { - if (cmd.Length != 4) + if (cmd.Length != 3) { - MainConsole.Instance.Output("Usage: show bot "); + MainConsole.Instance.Output("Usage: show bot "); return; } - string name = string.Format("{0} {1}", cmd[2], cmd[3]); + int botNumber; + + if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, cmd[2], out botNumber)) + return; + + string name = string.Format("{0} {1}_{2}", m_firstName, m_lastNameStem, botNumber); Bot bot; -- cgit v1.1