diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 245c460..c335a6e 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -203,6 +203,9 @@ namespace pCampBot | |||
203 | HandleStand); | 203 | HandleStand); |
204 | 204 | ||
205 | m_console.Commands.AddCommand( | 205 | m_console.Commands.AddCommand( |
206 | "bot", false, "set bots", "set bots <key> <value>", "Set a setting for all bots.", HandleSetBots); | ||
207 | |||
208 | m_console.Commands.AddCommand( | ||
206 | "bot", false, "show regions", "show regions", "Show regions known to bots", HandleShowRegions); | 209 | "bot", false, "show regions", "show regions", "Show regions known to bots", HandleShowRegions); |
207 | 210 | ||
208 | m_console.Commands.AddCommand( | 211 | m_console.Commands.AddCommand( |
@@ -519,6 +522,30 @@ namespace pCampBot | |||
519 | Environment.Exit(0); | 522 | Environment.Exit(0); |
520 | } | 523 | } |
521 | 524 | ||
525 | private void HandleSetBots(string module, string[] cmd) | ||
526 | { | ||
527 | string key = cmd[2]; | ||
528 | string rawValue = cmd[3]; | ||
529 | |||
530 | if (key == "SEND_AGENT_UPDATES") | ||
531 | { | ||
532 | bool newSendAgentUpdatesSetting; | ||
533 | |||
534 | if (!ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, rawValue, out newSendAgentUpdatesSetting)) | ||
535 | return; | ||
536 | |||
537 | MainConsole.Instance.OutputFormat( | ||
538 | "Setting SEND_AGENT_UPDATES to {0} for all bots", newSendAgentUpdatesSetting); | ||
539 | |||
540 | lock (m_bots) | ||
541 | m_bots.ForEach(b => b.Client.Settings.SEND_AGENT_UPDATES = newSendAgentUpdatesSetting); | ||
542 | } | ||
543 | else | ||
544 | { | ||
545 | MainConsole.Instance.Output("Error: Only setting currently available is SEND_AGENT_UPDATES"); | ||
546 | } | ||
547 | } | ||
548 | |||
522 | private void HandleShowRegions(string module, string[] cmd) | 549 | private void HandleShowRegions(string module, string[] cmd) |
523 | { | 550 | { |
524 | string outputFormat = "{0,-30} {1, -20} {2, -5} {3, -5}"; | 551 | string outputFormat = "{0,-30} {1, -20} {2, -5} {3, -5}"; |