Fixed /unban not working with BanOnUsernames disabled.
This commit is contained in:
parent
e990732da3
commit
5ec03c8e08
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue