Ejemplo n.º 1
0
        public bool RemoveGroup(string item, string group)
        {
            ItemBan b = GetItemBanByName(item);

            if (b != null)
            {
                try
                {
                    b.RemoveGroup(group);
                    string groups = string.Join(",", b.AllowedGroups);
                    int    q      = database.Query("UPDATE ItemBans SET AllowedGroups=@0 WHERE ItemName=@1", groups,
                                                   item);

                    if (q > 0)
                    {
                        return(true);
                    }
                }
                catch (Exception ex)
                {
                    TShock.Log.Error(ex.ToString());
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        public bool RemoveGroup(string item, string group)
        {
            ItemBan b = GetItemBanByName(item);

            if (b != null)
            {
                b.RemoveGroup(group);
                string groups = string.Join(",", b.AllowedGroups);
                int    q      = database.Query("UPDATE ItemBans SET AllowedGroups=@0 WHERE ItemName=@1", groups,
                                               item);
                if (q > 0)
                {
                    return(true);
                }
            }
            return(false);
        }