public static void Main(string[] args) { IConfig config = ParseConfig(args); if (config.Get("help") != null || config.Get("loginuri") == null) { Help(); } else { int botcount = config.GetInt("botcount", 1); BotManager bm = new BotManager(); //startup specified number of bots. 1 is the default bm.dobotStartup(botcount, config); while (true) { try { MainConsole.Instance.Prompt(); } catch (Exception e) { m_log.ErrorFormat("Command error: {0}", e); } } } }
public static void Main(string[] args) { IConfig config = ParseConfig(args); if (config.Get("help") != null || config.Get("loginuri") == null) { Help(); } else if (config.Get("firstname") == null || config.Get("lastname") == null || config.Get("password") == null) { Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots."); } else { int botcount = config.GetInt("botcount", 1); BotManager bm = new BotManager(); //startup specified number of bots. 1 is the default bm.dobotStartup(botcount, config); while (true) { try { MainConsole.Instance.Prompt(); } catch (Exception e) { m_log.ErrorFormat("Command error: {0}", e); } } } }
public static void Main(string[] args) { XmlConfigurator.Configure(); IConfig config = ParseConfig(args); if (config.Get("help") != null || config.Get("loginuri") == null) { Help(); } else if (config.Get("firstname") == null || config.Get("lastname") == null || config.Get("password") == null) { Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots."); } else { int botcount = config.GetInt("botcount", 1); BotManager bm = new BotManager(); //startup specified number of bots. 1 is the default Thread startBotThread = new Thread(o => bm.dobotStartup(botcount, config)); startBotThread.Name = "Initial start bots thread"; startBotThread.Start(); while (true) { try { //MainConsole.Instance.Output("Please input command..."); MainConsole.Instance.Prompt(); } catch (Exception e) { m_log.ErrorFormat("Command error: {0}", e); } } } }