aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-14 21:07:29 +0100
committerJustin Clark-Casey (justincc)2013-08-14 21:08:00 +0100
commit2c67aa0f41193bf2271b75f060093f44819cdeae (patch)
tree2eb2ecde7ce654d1dbfab35dc728a47400b0d6f1 /OpenSim/Tools
parentAdd pCampbot RequestObjectTextures ini setting to control whether textures ar... (diff)
downloadopensim-SC_OLD-2c67aa0f41193bf2271b75f060093f44819cdeae.zip
opensim-SC_OLD-2c67aa0f41193bf2271b75f060093f44819cdeae.tar.gz
opensim-SC_OLD-2c67aa0f41193bf2271b75f060093f44819cdeae.tar.bz2
opensim-SC_OLD-2c67aa0f41193bf2271b75f060093f44819cdeae.tar.xz
If pCampbot has been asked to shutdown, don't carry on logging in queued bots
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs12
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