Fixed ban to not kick inactive players as well.

This commit is contained in:
ricky 2011-06-07 20:45:09 +10:00
parent cfd4de2f32
commit a87eeaffeb

View file

@ -227,7 +227,7 @@ namespace TShockAPI
public static bool Kick(int ply, string reason, string adminUserName = "")
{
if (!Main.player[ply].active)
return false;
return true;
if (!TShock.players[ply].group.HasPermission("immunetokick"))
{
string playerName = Main.player[ply].name;
@ -254,6 +254,7 @@ namespace TShockAPI
string ip = GetPlayerIP(plr);
string playerName = Main.player[plr].name;
TShock.Bans.AddBan(ip, playerName, reason);
if (!Main.player[plr].active)
NetMessage.SendData(0x2, plr, -1, "Banned: " + reason, 0x0, 0f, 0f, 0f);
Log.Info("Banned " + playerName + " for : " + reason);
if (adminUserName.Length == 0)