Esempio n. 1
0
        public bool Whitelist(Player p, LevelPermission plRank, Level lvl, string target)
        {
            if (!CheckList(p, plRank, target, true))
            {
                return(false);
            }
            if (Whitelisted.CaselessContains(target))
            {
                p.Message("{0} %Sis already whitelisted.", p.FormatNick(target));
                return(true);
            }

            bool removed = true;

            if (!Blacklisted.CaselessRemove(target))
            {
                Whitelisted.Add(target);
                removed = false;
            }
            OnListChanged(p, lvl, target, true, removed);
            return(true);
        }
Esempio n. 2
0
        public bool Whitelist(Player p, string target)
        {
            if (!CheckList(p, target, true))
            {
                return(false);
            }
            if (Whitelisted.CaselessContains(target))
            {
                Player.Message(p, "{0} %Sis already whitelisted.", PlayerInfo.GetColoredName(p, target));
                return(true);
            }

            bool removed = true;

            if (!Blacklisted.CaselessRemove(target))
            {
                Whitelisted.Add(target);
                removed = false;
            }
            OnListChanged(p, target, true, removed);
            return(true);
        }