Added some extra logging when kicking for cheating/griefing.

This commit is contained in:
Deathmax 2011-06-05 13:14:58 +08:00
parent dc374f9051
commit 422d2cfdb3

View file

@ -252,8 +252,8 @@ namespace TShockAPI
if (maxLife > Main.player[ply].statLifeMax + 20 || life > maxLife) if (maxLife > Main.player[ply].statLifeMax + 20 || life > maxLife)
if (players[ply].syncHP) if (players[ply].syncHP)
{ {
if (maxLife > Main.player[ply].statLifeMax + 20 || life > maxLife) Tools.HandleCheater(ply);
Tools.HandleCheater(ply); Log.Info(Tools.FindPlayer(ply) + " had increased max life by more than 20 or increased life more than max");
} }
else else
players[ply].syncHP = true; players[ply].syncHP = true;
@ -271,8 +271,8 @@ namespace TShockAPI
if (maxmana > Main.player[ply].statManaMax + 20 || mana > maxmana) if (maxmana > Main.player[ply].statManaMax + 20 || mana > maxmana)
if (players[ply].syncMP) if (players[ply].syncMP)
{ {
if (maxmana > Main.player[ply].statManaMax + 20 || mana > maxmana) Tools.HandleCheater(ply);
Tools.HandleCheater(ply); Log.Info(Tools.FindPlayer(ply) + " had increased max mana by more than 20 or increased mana more than max");
} }
else else
players[ply].syncMP = true; players[ply].syncMP = true;
@ -287,6 +287,7 @@ namespace TShockAPI
if (e.Msg.whoAmI != ply) if (e.Msg.whoAmI != ply)
{ {
//fuck you faggot //fuck you faggot
Log.Info(Tools.FindPlayer(e.Msg.whoAmI) + " was kicked for trying to fake chat as someone else.");
Tools.HandleCheater(ply); Tools.HandleCheater(ply);
} }
} }
@ -345,6 +346,7 @@ namespace TShockAPI
if (id != e.Msg.whoAmI) if (id != e.Msg.whoAmI)
{ {
Tools.HandleGriefer(e.Msg.whoAmI); Tools.HandleGriefer(e.Msg.whoAmI);
Log.Info(Tools.FindPlayer(e.Msg.whoAmI) + " was kicked for trying to execute KillMe on someone else.");
e.Handled = true; e.Handled = true;
} }
} }