Schumix.Irc.Flood.AntiFlood.Ignore C# (CSharp) Method

Ignore() public method

public Ignore ( IRCMessage sIRCMessage ) : bool
sIRCMessage Schumix.Framework.Irc.IRCMessage
return bool
        public bool Ignore(IRCMessage sIRCMessage)
        {
            string nick = sIRCMessage.Nick.ToLower();

            if(CommandFloodList.ContainsKey(nick))
            {
                if(!CommandFloodList[nick].IsIgnore &&
                   CommandFloodList[nick].Message >= FloodingConfig.NumberOfCommands)
                {
                    CommandFloodList[nick].IsIgnore = true;
                    CommandFloodList[nick].Warring = true;
                    CommandFloodList[nick].BanTime = DateTime.Now.AddMinutes(1);
                    CommandFloodList[nick].Message = 0;
                    sSendMessage.SendCMPrivmsg(nick, sLManager.GetWarningText("CommandsDisabled2", sIRCMessage.Channel, sIRCMessage.ServerName), FloodingConfig.Seconds);
                    return true;
                }

                if(CommandFloodList[nick].IsIgnore)
                {
                    if(CommandFloodList[nick].Warring)
                    {
                        CommandFloodList[nick].Warring = false;
                        sSendMessage.SendChatMessage(sIRCMessage, sLManager.GetWarningText("CommandsDisabled", sIRCMessage.Channel, sIRCMessage.ServerName));
                    }

                    return true;
                }
            }

            return false;
        }