Ejemplo n.º 1
0
        //base command executor
        public void banCommand(string[] message)
        {
            switch (message[0])
            {
            case "-id":
                if (message.Length < 2)
                {
                    ThrowErrorMessage();
                }
                int id = 0;
                if (!Int32.TryParse(message[1], out id))
                {
                    ThrowErrorMessage();
                }
                else
                {
                    bindManager.GetFliterInfo().AddBanId(id);
                }
                break;

            case "-regex":
                if (message.Length < 2)
                {
                    ThrowErrorMessage();
                }
                bindManager.GetFliterInfo().AddBanRuleRegex(message[1]);
                break;

            default:
                bindManager.GetFliterInfo().AddBanUserName(message[0]);
                break;
            }
        }
Ejemplo n.º 2
0
 private BanInfo GetInfo()
 {
     return(bindManager.GetFliterInfo());
 }