whoops pushed in some test stuff that would break commands fixed removeItem ban tho, so its all good
This commit is contained in:
parent
347d701b7f
commit
a2f2ea1500
2 changed files with 4 additions and 14 deletions
|
|
@ -100,12 +100,8 @@ namespace TShockAPI.DB
|
|||
|
||||
public void RemoveBan(string itemname)
|
||||
{
|
||||
if (ItemIsBanned(itemname))
|
||||
if (!ItemIsBanned(itemname))
|
||||
return;
|
||||
else
|
||||
{
|
||||
ItemBans.Remove(itemname);
|
||||
}
|
||||
try
|
||||
{
|
||||
using (var com = database.CreateCommand())
|
||||
|
|
@ -113,12 +109,11 @@ namespace TShockAPI.DB
|
|||
com.CommandText = "Delete FROM 'ItemBans' WHERE ItemName=@itemname;";
|
||||
com.AddParameter("@itemname", Tools.GetItemByName(itemname)[0].name);
|
||||
com.ExecuteNonQuery();
|
||||
|
||||
ItemBans.Remove(itemname);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ItemBans.Remove(itemname);
|
||||
Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue