public static void Main(string[] args) { // Configure log4net from app.config XmlConfigurator.Configure(); var settings = new SettingsFile("Settings.xml"); _settingsTimer = new Timer(SaveSettings, settings, SaveInterval, SaveInterval); Console.WriteLine("Press Shift+Q to quit."); foreach (var instance in settings.Instances) { var bot = new Bot(instance); ThreadPool.QueueUserWorkItem(a => bot.Connect()); } while(true) { var key = Console.ReadKey(true); if(key.Modifiers.HasFlag(ConsoleModifiers.Shift) && key.Key == ConsoleKey.Q) { break; } } settings.Save(); }
public StreamHandler(Bot bot) { _bot = bot; _streams = new List<Stream>(); _streamPlugins = new IStreamPlugin[] { new Livestream(), new Owned(), new Twitch() }; }