Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public StreamHandler(Bot bot)
        {
            _bot = bot;
            _streams = new List<Stream>();

            _streamPlugins = new IStreamPlugin[]
            {
                new Livestream(),
                new Owned(),
                new Twitch()
            };
        }