BanManager now fully sql based

This commit is contained in:
high 2011-07-01 17:08:42 -04:00
parent 6a960c2db9
commit f1c86a6216
2 changed files with 66 additions and 35 deletions

View file

@ -456,8 +456,10 @@ namespace TShockAPI
var ban = TShock.Bans.GetBanByName(plStr);
if (ban != null)
{
TShock.Bans.RemoveBan(ban);
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
if (TShock.Bans.RemoveBan(ban.IP))
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
else
args.Player.SendMessage(string.Format("Failed to Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
}
else
{
@ -482,8 +484,10 @@ namespace TShockAPI
var ban = TShock.Bans.GetBanByIp(plStr);
if (ban != null)
{
TShock.Bans.RemoveBan(ban);
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
if (TShock.Bans.RemoveBan(ban.IP))
args.Player.SendMessage(string.Format("Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
else
args.Player.SendMessage(string.Format("Failed to Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
}
else
{