aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/BotManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-03 17:07:57 +0100
committerJustin Clark-Casey (justincc)2013-09-03 17:07:57 +0100
commit9c652079361f496c46640ed67e964ee6164ce06e (patch)
tree4408162af7fa2e5a2da0ace72101745138ed8789 /OpenSim/Tools/pCampBot/BotManager.cs
parentminor simplification of some unix date functions in Util. No functional change. (diff)
downloadopensim-SC-9c652079361f496c46640ed67e964ee6164ce06e.zip
opensim-SC-9c652079361f496c46640ed67e964ee6164ce06e.tar.gz
opensim-SC-9c652079361f496c46640ed67e964ee6164ce06e.tar.bz2
opensim-SC-9c652079361f496c46640ed67e964ee6164ce06e.tar.xz
Show behaviours of pCampbot bots in "show bots" and "show bot" console commands
Diffstat (limited to '')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs22
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 5c3835b..35a24d1 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -572,10 +572,11 @@ namespace pCampBot
572 private void HandleShowBotsStatus(string module, string[] cmd) 572 private void HandleShowBotsStatus(string module, string[] cmd)
573 { 573 {
574 ConsoleDisplayTable cdt = new ConsoleDisplayTable(); 574 ConsoleDisplayTable cdt = new ConsoleDisplayTable();
575 cdt.AddColumn("Name", 30); 575 cdt.AddColumn("Name", 24);
576 cdt.AddColumn("Region", 30); 576 cdt.AddColumn("Region", 24);
577 cdt.AddColumn("Status", 14); 577 cdt.AddColumn("Status", 13);
578 cdt.AddColumn("Connections", 11); 578 cdt.AddColumn("Conns", 5);
579 cdt.AddColumn("Behaviours", 20);
579 580
580 Dictionary<ConnectionState, int> totals = new Dictionary<ConnectionState, int>(); 581 Dictionary<ConnectionState, int> totals = new Dictionary<ConnectionState, int>();
581 foreach (object o in Enum.GetValues(typeof(ConnectionState))) 582 foreach (object o in Enum.GetValues(typeof(ConnectionState)))
@@ -583,13 +584,17 @@ namespace pCampBot
583 584
584 lock (m_bots) 585 lock (m_bots)
585 { 586 {
586 foreach (Bot pb in m_bots) 587 foreach (Bot bot in m_bots)
587 { 588 {
588 Simulator currentSim = pb.Client.Network.CurrentSim; 589 Simulator currentSim = bot.Client.Network.CurrentSim;
589 totals[pb.ConnectionState]++; 590 totals[bot.ConnectionState]++;
590 591
591 cdt.AddRow( 592 cdt.AddRow(
592 pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState, pb.SimulatorsCount); 593 bot.Name,
594 currentSim != null ? currentSim.Name : "(none)",
595 bot.ConnectionState,
596 bot.SimulatorsCount,
597 string.Join(",", bot.Behaviours.ConvertAll<string>(behaviour => behaviour.AbbreviatedName)));
593 } 598 }
594 } 599 }
595 600
@@ -645,6 +650,7 @@ namespace pCampBot
645 MainConsole.Instance.Output("Settings"); 650 MainConsole.Instance.Output("Settings");
646 651
647 ConsoleDisplayList statusCdl = new ConsoleDisplayList(); 652 ConsoleDisplayList statusCdl = new ConsoleDisplayList();
653 statusCdl.AddRow("Behaviours", string.Join(", ", bot.Behaviours.ConvertAll<string>(b => b.Name)));
648 GridClient botClient = bot.Client; 654 GridClient botClient = bot.Client;
649 statusCdl.AddRow("SEND_AGENT_UPDATES", botClient.Settings.SEND_AGENT_UPDATES); 655 statusCdl.AddRow("SEND_AGENT_UPDATES", botClient.Settings.SEND_AGENT_UPDATES);
650 656