fixed kicking and banning, and removed a unused variable

This commit is contained in:
Maverick Motherfucker 2011-06-06 17:11:49 -07:00
parent a7e912c9f4
commit df9e2bb423
3 changed files with 11 additions and 6 deletions

View file

@ -840,8 +840,11 @@ namespace TShockAPI
public static void Ban(int plr, string reason = "")
{
Tools.Kick(plr, reason);
Bans.AddBan(Tools.GetPlayerIP(plr), Main.player[plr].name, reason);
if (!players[plr].group.HasPermission("immunetoban"))
{
Tools.Kick(plr,"Banned: " + reason);
Bans.AddBan(Tools.GetPlayerIP(plr), Main.player[plr].name, reason);
}
}
public class Position