Пример #1
0
        private bool CheckAndTimeoutSpam(WinterBot bot, TwitchUser user, string text)
        {
            if (user.IsSubscriber)
            {
                return(false);
            }

            if (String.IsNullOrWhiteSpace(m_clearMsg))
            {
                return(false);
            }

            if (text.ToLower().Contains(m_clearMsg))
            {
                if (m_spamTimeout == null)
                {
                    bot.Ban(user);
                }
                else
                {
                    bot.Timeout(user, (int)m_spamTimeout);
                }

                return(true);
            }

            return(false);
        }
Пример #2
0
        private bool CheckAndTimeoutSpam(WinterBot bot, TwitchUser user, string text)
        {
            if (user.IsSubscriber)
                return false;

            if (String.IsNullOrWhiteSpace(m_clearMsg))
                return false;

            if (text.ToLower().Contains(m_clearMsg))
            {
                if (m_spamTimeout == null)
                    bot.Ban(user);
                else
                    bot.Timeout(user, (int)m_spamTimeout);

                return true;
            }

            return false;
        }