From 480216f50f40bdb9709f9c6eec189a2ca027f395 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 May 2012 02:38:29 +0100 Subject: Print out more information on connecting bots --- OpenSim/Tools/pCampBot/Bot.cs | 2 +- OpenSim/Tools/pCampBot/BotManager.cs | 26 ++++++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'OpenSim/Tools') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 95dba9f..b6cd287 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -168,7 +168,7 @@ namespace pCampBot b => { Thread.Sleep(Random.Next(3000, 10000)); - + // m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType()); b.Action(); } diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index b9eabbf..d615b3f 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -161,28 +161,34 @@ namespace pCampBot Array.ForEach( cs.GetString("behaviours", "p").Split(new char[] { ',' }), b => behaviourSwitches.Add(b)); + MainConsole.Instance.OutputFormat( + "[BOT MANAGER]: Starting {0} bots connecting to {1}, named {2} {3}_", + botcount, + loginUri, + firstName, + lastNameStem); + + MainConsole.Instance.OutputFormat("[BOT MANAGER]: Delay between logins is {0}ms", LoginDelay); + for (int i = 0; i < botcount; i++) { string lastName = string.Format("{0}_{1}", lastNameStem, i); + // We must give each bot its own list of instantiated behaviours since they store state. List behaviours = new List(); - + // Hard-coded for now if (behaviourSwitches.Contains("p")) behaviours.Add(new PhysicsBehaviour()); - + if (behaviourSwitches.Contains("g")) behaviours.Add(new GrabbingBehaviour()); - + if (behaviourSwitches.Contains("t")) behaviours.Add(new TeleportBehaviour()); - + if (behaviourSwitches.Contains("c")) behaviours.Add(new CrossBehaviour()); - - MainConsole.Instance.OutputFormat( - "[BOT MANAGER]: Bot {0} {1} configured for behaviours {2}", - firstName, lastName, string.Join(",", behaviours.ConvertAll(b => b.Name).ToArray())); StartBot(this, behaviours, firstName, lastName, password, loginUri); } @@ -221,6 +227,10 @@ namespace pCampBot BotManager bm, List behaviours, string firstName, string lastName, string password, string loginUri) { + MainConsole.Instance.OutputFormat( + "[BOT MANAGER]: Starting bot {0} {1}, behaviours are {2}", + firstName, lastName, string.Join(",", behaviours.ConvertAll(b => b.Name).ToArray())); + Bot pb = new Bot(bm, behaviours, firstName, lastName, password, loginUri); pb.OnConnected += handlebotEvent; -- cgit v1.1