diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 5988584..397a98e 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -52,6 +52,11 @@ namespace pCampBot | |||
52 | public const int DefaultLoginDelay = 5000; | 52 | public const int DefaultLoginDelay = 5000; |
53 | 53 | ||
54 | /// <summary> | 54 | /// <summary> |
55 | /// True if pCampbot is in the process of shutting down. | ||
56 | /// </summary> | ||
57 | public bool ShuttingDown { get; private set; } | ||
58 | |||
59 | /// <summary> | ||
55 | /// Delay between logins of multiple bots. | 60 | /// Delay between logins of multiple bots. |
56 | /// </summary> | 61 | /// </summary> |
57 | /// <remarks>TODO: This value needs to be configurable by a command line argument.</remarks> | 62 | /// <remarks>TODO: This value needs to be configurable by a command line argument.</remarks> |
@@ -186,6 +191,9 @@ namespace pCampBot | |||
186 | 191 | ||
187 | for (int i = 0; i < botcount; i++) | 192 | for (int i = 0; i < botcount; i++) |
188 | { | 193 | { |
194 | if (ShuttingDown) | ||
195 | break; | ||
196 | |||
189 | string lastName = string.Format("{0}_{1}", lastNameStem, i + fromBotNumber); | 197 | string lastName = string.Format("{0}_{1}", lastNameStem, i + fromBotNumber); |
190 | 198 | ||
191 | // We must give each bot its own list of instantiated behaviours since they store state. | 199 | // We must give each bot its own list of instantiated behaviours since they store state. |
@@ -363,7 +371,9 @@ namespace pCampBot | |||
363 | 371 | ||
364 | private void HandleShutdown(string module, string[] cmd) | 372 | private void HandleShutdown(string module, string[] cmd) |
365 | { | 373 | { |
366 | m_log.Info("[BOTMANAGER]: Shutting down bots"); | 374 | MainConsole.Instance.Output("Shutting down"); |
375 | |||
376 | ShuttingDown = true; | ||
367 | doBotShutdown(); | 377 | doBotShutdown(); |
368 | } | 378 | } |
369 | 379 | ||