Exemple #1
0
            public MuteInfo AddMute(IPlayer target, string adminName, DateTime expireDate, string reason = null, bool addReason = false)
            {
                MuteInfo info;

                if (Mutes.ContainsKey(target.Id))
                {
                    MuteInfo m = GetMute(target);

                    if (m == null)
                    {
                        return(null);
                    }

                    m.ExpireDate = expireDate;
                    m.Reason     = (addReason ? $"{m.Reason} | {reason}" : reason);

                    return(null);
                }

                info = new MuteInfo(target, adminName, expireDate, reason);
                Mutes.Add(target.Id, info);

                return(info);
            }
Exemple #2
0
        public override Task DivideLine(string line)
        {
            if (line.Contains(" CITC "))
            {
                CitC.Add(line);
            }

            else if (line.Contains(" LOGIN: "******" LOGIN MISC: "))
            {
                LoginMisc.Add(line);
            }
            else if (line.Contains(" QUIT MISC: "))
            {
                QuitMisc.Add(line);
            }

            else if (line.Contains(" (AA)(BAN) "))
            {
                Bans.Add(line);
            }
            else if (line.Contains(" (AA)(MUTE) "))
            {
                Mutes.Add(line);
            }
            else if (line.Contains(" (AA)(JAIL) "))
            {
                Jails.Add(line);
            }
            else if (line.Contains(" (AA)(CONTACTADMIN) "))
            {
                Cad.Add(line);
            }
            else if (line.Contains(" (AA)(SUPPORT) "))
            {
                Support.Add(line);
            }

            else if (line.Contains(" opened '") && line.Contains(" ms"))
            {
                LogsFetched.Add(line);
            }
            else if (line.Contains(" [CM] ") && line.Contains(" set "))
            {
                Reports.Add(line);
            }
            else if (line.Contains("[Complaint ID") && line.Contains(" replied with "))
            {
                Reports.Add(line);
            }
            else if (line.Contains(" warped to ") || line.Contains(" WL: "))
            {
                if (line.Contains("WL: 0") || line.Contains("with 0 stars Dim: 0"))
                {
                    PossibleAbuse.Add(line);
                }
                else
                {
                    RegisteredAbuse.Add(line);
                }
            }

            /*else if (line.Contains(" warped to ") && !line.Contains(" WL: 0") && !line.Contains(" (EM) "))
             *  RegisteredAbuse.Add(line);
             * else if (line.Contains(" warped to ") && line.Contains(" WL: 0") && !line.Contains(" (EM) "))
             *  PossibleAbuse.Add(line);
             * else if (line.Contains(" ST ") && (!line.Contains("from 0") && line.Contains("wanted points.")))
             *  RegisteredAbuse.Add(line);*/
            else if (line.Contains(" ST ") && line.Contains("from 0 wanted points."))
            {
                PossibleAbuse.Add(line);
            }
            else if (line.Contains("abuse") ||
                     line.Contains("recommendation") ||
                     line.Contains("leak") ||
                     line.Contains("bias") ||
                     line.Contains("accept") ||
                     line.Contains("jcm") ||
                     line.Contains("rcm") ||
                     line.Contains("scm")
                     )
            {
                PossibleAbuse.Add(line);
            }

            else if (line.Contains("object. ID:"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("changed account:"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("changed the password of account"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("checked the PIN code of account"))
            {
                DutyRelated.Add(line);
            }
            else if (line.Contains("zone 0 p"))
            {
                DutyRelated.Add(line);
            }

            else if (line.Contains(" (PP) "))
            {
                PendingPunishments.Add(line);
            }
            else
            {
                Other.Add(line);
            }
            return(Task.CompletedTask);
        }
 public void Add(Mute item) => Mutes.Add(item);