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); }
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; }