Fixed /unban not working with BanOnUsernames disabled.

This commit is contained in:
Lucas Nicodemus 2011-07-30 20:59:10 -06:00
parent e990732da3
commit 5ec03c8e08

View file

@ -706,6 +706,14 @@ namespace TShockAPI
else
args.Player.SendMessage(string.Format("Failed to Unbanned {0} ({1})!", ban.Name, ban.IP), Color.Red);
}
else if (!TShock.Config.EnableBanOnUsernames)
{
ban = TShock.Bans.GetBanByIp(plStr);
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
{
args.Player.SendMessage("Invalid player!", Color.Red);