public void attachEventListenerObjects(JsonConfig Config, bool as_docker) { LogFormater.Info("HTTP service requested:" + Config.Http_Enable.ToString()); if (Config.Http_Enable == true) { new Thread(() => { new HttpAsService(Bot, Config, as_docker); }).Start(); } Adverts = new advertsService(this, as_docker); Events = new onevent(this, as_docker); betterAtHomeService = new BetterAtHome(this, Config); betterTracking = new BetterTracking(this); datastorage = new Datastorage(this); }
protected void keep_alive() { while (Bot.KillMe == false) { string NewStatusMessage = Bot.GetStatus(); NewStatusMessage = NewStatusMessage.Trim(); if (NewStatusMessage != Bot.LastStatusMessage) { if (NewStatusMessage.Replace(" ", "") != "") { Bot.LastStatusMessage = NewStatusMessage; Bot.Log2File(LogFormater.Status(Bot.LastStatusMessage, false), ConsoleLogLogLevel.Status); } } Thread.Sleep(1500); } Adverts = null; Events = null; betterAtHomeService = null; betterTracking = null; datastorage = null; Bot = null; exitBot = true; }