diff options
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 1a46380..74bd36a 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -330,17 +330,30 @@ namespace pCampBot | |||
330 | string outputFormat = "{0,-30} {1, -30} {2,-14}"; | 330 | string outputFormat = "{0,-30} {1, -30} {2,-14}"; |
331 | MainConsole.Instance.OutputFormat(outputFormat, "Name", "Region", "Status"); | 331 | MainConsole.Instance.OutputFormat(outputFormat, "Name", "Region", "Status"); |
332 | 332 | ||
333 | Dictionary<ConnectionState, int> totals = new Dictionary<ConnectionState, int>(); | ||
334 | foreach (object o in Enum.GetValues(typeof(ConnectionState))) | ||
335 | totals[(ConnectionState)o] = 0; | ||
336 | |||
333 | lock (m_lBot) | 337 | lock (m_lBot) |
334 | { | 338 | { |
335 | foreach (Bot pb in m_lBot) | 339 | foreach (Bot pb in m_lBot) |
336 | { | 340 | { |
337 | Simulator currentSim = pb.Client.Network.CurrentSim; | 341 | Simulator currentSim = pb.Client.Network.CurrentSim; |
342 | totals[pb.ConnectionState]++; | ||
338 | 343 | ||
339 | MainConsole.Instance.OutputFormat( | 344 | MainConsole.Instance.OutputFormat( |
340 | outputFormat, | 345 | outputFormat, |
341 | pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState); | 346 | pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState); |
342 | } | 347 | } |
343 | } | 348 | } |
349 | |||
350 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | ||
351 | |||
352 | foreach (KeyValuePair<ConnectionState, int> kvp in totals) | ||
353 | cdl.AddRow(kvp.Key, kvp.Value); | ||
354 | |||
355 | |||
356 | MainConsole.Instance.OutputFormat("\n{0}", cdl.ToString()); | ||
344 | } | 357 | } |
345 | 358 | ||
346 | /* | 359 | /* |