diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 2cbadeffbf..fe6048a508 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -51,6 +51,11 @@ namespace pCampBot
public const int DefaultLoginDelay = 5000;
+ ///
+ /// Is pCampbot in the process of connecting bots?
+ ///
+ public bool ConnectingBots { get; private set; }
+
///
/// Is pCampbot in the process of disconnecting bots?
///
@@ -219,7 +224,25 @@ namespace pCampBot
botcount, m_firstName, m_lastNameStem, m_password, m_loginUri, m_startUri, m_fromBotNumber, m_wearSetting, m_behaviourSwitches);
}
- private void ConnectBots(
+ private bool ConnectBots(
+ int botcount, string firstName, string lastNameStem, string password, string loginUri, string startUri, int fromBotNumber, string wearSetting,
+ HashSet behaviourSwitches)
+ {
+ ConnectingBots = true;
+
+ Thread startBotThread
+ = new Thread(
+ o => ConnectBotsInternal(
+ botcount, firstName, lastNameStem, password, loginUri, startUri, fromBotNumber, wearSetting,
+ behaviourSwitches));
+
+ startBotThread.Name = "Bots connection thread";
+ startBotThread.Start();
+
+ return true;
+ }
+
+ private void ConnectBotsInternal(
int botcount, string firstName, string lastNameStem, string password, string loginUri, string startUri, int fromBotNumber, string wearSetting,
HashSet behaviourSwitches)
{
@@ -273,6 +296,8 @@ namespace pCampBot
// Stagger logins
Thread.Sleep(LoginDelay);
}
+
+ ConnectingBots = false;
}
///
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs
index b02f9170f9..e58b130212 100644
--- a/OpenSim/Tools/pCampBot/pCampBot.cs
+++ b/OpenSim/Tools/pCampBot/pCampBot.cs
@@ -95,10 +95,7 @@ namespace pCampBot
int botcount = commandLineConfig.GetInt("botcount", 1);
- //startup specified number of bots. 1 is the default
- Thread startBotThread = new Thread(o => bm.dobotStartup(botcount, commandLineConfig));
- startBotThread.Name = "Initial start bots thread";
- startBotThread.Start();
+ bm.dobotStartup(botcount, commandLineConfig);
while (true)
{