Make pCampbot "show bot" command take the bot number instead of the full bot name
Shorter and can do this because bot names are uniform0.7.6-extended
							parent
							
								
									902c1f0009
								
							
						
					
					
						commit
						803fa36b68
					
				|  | @ -212,7 +212,7 @@ namespace pCampBot | ||||||
|                 "bot", false, "show bots", "show bots", "Shows the status of all bots", HandleShowBotsStatus); |                 "bot", false, "show bots", "show bots", "Shows the status of all bots", HandleShowBotsStatus); | ||||||
| 
 | 
 | ||||||
|             m_console.Commands.AddCommand( |             m_console.Commands.AddCommand( | ||||||
|                 "bot", false, "show bot", "show bot <first-name> <last-name>",  |                 "bot", false, "show bot", "show bot <n>",  | ||||||
|                 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); |                 "Shows the detailed status and settings of a particular bot.", HandleShowBotStatus); | ||||||
| 
 | 
 | ||||||
|             m_bots = new List<Bot>(); |             m_bots = new List<Bot>(); | ||||||
|  | @ -605,13 +605,18 @@ namespace pCampBot | ||||||
| 
 | 
 | ||||||
|         private void HandleShowBotStatus(string module, string[] cmd) |         private void HandleShowBotStatus(string module, string[] cmd) | ||||||
|         { |         { | ||||||
|             if (cmd.Length != 4) |             if (cmd.Length != 3) | ||||||
|             { |             { | ||||||
|                 MainConsole.Instance.Output("Usage: show bot <first-name> <last-name>"); |                 MainConsole.Instance.Output("Usage: show bot <n>"); | ||||||
|                 return; |                 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; |             Bot bot; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Justin Clark-Casey (justincc)
						Justin Clark-Casey (justincc)