aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/BotManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-31 21:33:25 +0000
committerJustin Clark-Casey (justincc)2011-10-31 21:33:25 +0000
commite3f51df3c27c5bc74bc69789d18015c538220935 (patch)
treef9965d81a3ccf0410229c636c03311c7d763ded6 /OpenSim/Tools/pCampBot/BotManager.cs
parentPlug a security hole in the inventory service (diff)
downloadopensim-SC-e3f51df3c27c5bc74bc69789d18015c538220935.zip
opensim-SC-e3f51df3c27c5bc74bc69789d18015c538220935.tar.gz
opensim-SC-e3f51df3c27c5bc74bc69789d18015c538220935.tar.bz2
opensim-SC-e3f51df3c27c5bc74bc69789d18015c538220935.tar.xz
Stop pCampbot from firing connected event twice, which results in double counting.
Diffstat (limited to '')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 614b350..c9d1446 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -81,16 +81,16 @@ namespace pCampBot
81 81
82 m_console.Commands.AddCommand("bot", false, "shutdown", 82 m_console.Commands.AddCommand("bot", false, "shutdown",
83 "shutdown", 83 "shutdown",
84 "Gracefully shut down bots", HandleShutdown); 84 "Shutdown bots and exit", HandleShutdown);
85 85
86 m_console.Commands.AddCommand("bot", false, "quit", 86 m_console.Commands.AddCommand("bot", false, "quit",
87 "quit", 87 "quit",
88 "Force quit (DANGEROUS, try shutdown first)", 88 "Shutdown bots and exit",
89 HandleShutdown); 89 HandleShutdown);
90 90
91 m_console.Commands.AddCommand("bot", false, "add bots", 91// m_console.Commands.AddCommand("bot", false, "add bots",
92 "add bots <number>", 92// "add bots <number>",
93 "Add more bots", HandleAddBots); 93// "Add more bots", HandleAddBots);
94 94
95 m_lBot = new List<PhysicsBot>(); 95 m_lBot = new List<PhysicsBot>();
96 } 96 }
@@ -177,14 +177,14 @@ namespace pCampBot
177 switch (eventt) 177 switch (eventt)
178 { 178 {
179 case EventType.CONNECTED: 179 case EventType.CONNECTED:
180 m_log.Info("[ " + callbot.firstname + " " + callbot.lastname + "]: Connected"); 180 m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Connected");
181 numbots++; 181 numbots++;
182 break; 182 break;
183 case EventType.DISCONNECTED: 183 case EventType.DISCONNECTED:
184 m_log.Info("[ " + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); 184 m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Disconnected");
185 m_td[m_lBot.IndexOf(callbot)].Abort(); 185 m_td[m_lBot.IndexOf(callbot)].Abort();
186 numbots--; 186 numbots--;
187 if (numbots >1) 187 if (numbots <= 0)
188 Environment.Exit(0); 188 Environment.Exit(0);
189 break; 189 break;
190 } 190 }