예제 #1
0
        private void LoadExtensions()
        {
            if (m_options.Regulars)
            {
                m_regulars = new UserSet(this, "regulars");
                AddCommands(new Regulars(this));
            }

            ChatLog.Init(this);

            AddCommands(new AutoMessage(this));
            AddCommands(new UserCommands(this));

            AddCommands(new TimeoutController(this));
            AddCommands(new Quiet(this));
            AddCommands(new AutoPoll(this));
        }
예제 #2
0
        public static void Init(WinterBot bot)
        {
            var options = bot.Options;

            if (!options.ChatOptions.SaveLog)
            {
                return;
            }

            var log = new ChatLog(bot);

            bot.MessageReceived  += delegate(WinterBot sender, TwitchUser user, string text) { log.Add(new ChatMessage(user, text)); };
            bot.ActionReceived   += delegate(WinterBot sender, TwitchUser user, string text) { log.Add(new ChatAction(user, text)); };
            bot.ChatClear        += delegate(WinterBot sender, TwitchUser user) { log.Add(new ChatClearEvent(user)); };
            bot.UserSubscribed   += delegate(WinterBot sender, TwitchUser user) { log.Add(new ChatSubscribeEvent(user)); };
            bot.UserBanned       += delegate(WinterBot sender, TwitchUser user) { log.Add(new ChatBanEvent(user)); };
            bot.UserTimedOut     += delegate(WinterBot sender, TwitchUser user, int duration) { log.Add(new ChatTimeout(user, duration)); };
            bot.ModeratorAdded   += delegate(WinterBot sender, TwitchUser user) { log.Add(new ChatModEvent(user, true)); };
            bot.ModeratorRemoved += delegate(WinterBot sender, TwitchUser user) { log.Add(new ChatModEvent(user, false)); };
        }