From e3f51df3c27c5bc74bc69789d18015c538220935 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 31 Oct 2011 21:33:25 +0000 Subject: Stop pCampbot from firing connected event twice, which results in double counting. --- OpenSim/Tools/pCampBot/BotManager.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Tools/pCampBot/BotManager.cs') 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 m_console.Commands.AddCommand("bot", false, "shutdown", "shutdown", - "Gracefully shut down bots", HandleShutdown); + "Shutdown bots and exit", HandleShutdown); m_console.Commands.AddCommand("bot", false, "quit", "quit", - "Force quit (DANGEROUS, try shutdown first)", + "Shutdown bots and exit", HandleShutdown); - m_console.Commands.AddCommand("bot", false, "add bots", - "add bots ", - "Add more bots", HandleAddBots); +// m_console.Commands.AddCommand("bot", false, "add bots", +// "add bots ", +// "Add more bots", HandleAddBots); m_lBot = new List(); } @@ -177,14 +177,14 @@ namespace pCampBot switch (eventt) { case EventType.CONNECTED: - m_log.Info("[ " + callbot.firstname + " " + callbot.lastname + "]: Connected"); + m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Connected"); numbots++; break; case EventType.DISCONNECTED: - m_log.Info("[ " + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); + m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); m_td[m_lBot.IndexOf(callbot)].Abort(); numbots--; - if (numbots >1) + if (numbots <= 0) Environment.Exit(0); break; } -- cgit v1.1