diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index cca584a0..18b679ae 100644
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -189,7 +189,7 @@ namespace TShockAPI
if (Main.netMode != 2) { return; }
int plr = who; //legacy support
Tools.ShowMOTD(who);
- if ((Main.player[plr].statLifeMax > 400 || Main.player[plr].statManaMax > 200 || Main.player[plr].statLife > 400 || Main.player[plr].statMana > 200 || CheckInventory(plr)) && !Tools.IsAdmin(plr))
+ if (Main.player[plr].statLifeMax > 400 || Main.player[plr].statManaMax > 200 || Main.player[plr].statLife > 400 || Main.player[plr].statMana > 200 || CheckInventory(plr))
{
Tools.HandleCheater(plr);
}
diff --git a/TShockAPI/Tools.cs b/TShockAPI/Tools.cs
index 3f0ef0ab..6de0ce20 100644
--- a/TShockAPI/Tools.cs
+++ b/TShockAPI/Tools.cs
@@ -224,16 +224,19 @@ namespace TShockAPI
/// int player
public static void HandleCheater(int ply)
{
- string cheater = Tools.FindPlayer(ply);
- string ip = Tools.GetRealIP(Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint));
+ if (!Tools.IsAdmin(ply))
+ {
+ string cheater = Tools.FindPlayer(ply);
+ string ip = Tools.GetRealIP(Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint));
- FileTools.WriteGrief(ply);
- FileTools.WriteCheater(ply);
- if (!ConfigurationManager.kickCheater) { return; }
- Netplay.serverSock[ply].kill = true;
- Netplay.serverSock[ply].Reset();
- NetMessage.syncPlayers();
- Tools.Broadcast(cheater + " was " + (ConfigurationManager.banCheater ? "banned " : "kicked ") + "for cheating.");
+ FileTools.WriteGrief(ply);
+ FileTools.WriteCheater(ply);
+ if (!ConfigurationManager.kickCheater) { return; }
+ Netplay.serverSock[ply].kill = true;
+ Netplay.serverSock[ply].Reset();
+ NetMessage.syncPlayers();
+ Tools.Broadcast(cheater + " was " + (ConfigurationManager.banCheater ? "banned " : "kicked ") + "for cheating.");
+ }
}
///
/// Shows a MOTD to the player