diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 5988584f0a..397a98e37c 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -51,6 +51,11 @@ namespace pCampBot
public const int DefaultLoginDelay = 5000;
+ ///
+ /// True if pCampbot is in the process of shutting down.
+ ///
+ public bool ShuttingDown { get; private set; }
+
///
/// Delay between logins of multiple bots.
///
@@ -186,6 +191,9 @@ namespace pCampBot
for (int i = 0; i < botcount; i++)
{
+ if (ShuttingDown)
+ break;
+
string lastName = string.Format("{0}_{1}", lastNameStem, i + fromBotNumber);
// We must give each bot its own list of instantiated behaviours since they store state.
@@ -363,7 +371,9 @@ namespace pCampBot
private void HandleShutdown(string module, string[] cmd)
{
- m_log.Info("[BOTMANAGER]: Shutting down bots");
+ MainConsole.Instance.Output("Shutting down");
+
+ ShuttingDown = true;
doBotShutdown();
}