Added item stack hack detection to player slot handler

This commit is contained in:
vharonftw 2011-12-07 20:57:54 +08:00
parent 1a15deffd9
commit 91c0e76da7
2 changed files with 7 additions and 2 deletions

View file

@ -155,6 +155,11 @@ namespace TShockAPI
if (!args.Player.Group.HasPermission(Permissions.usebanneditem) && TShock.Itembans.ItemIsBanned(itemname))
args.Player.Disconnect("Using banned item: " + itemname + ", remove it and rejoin");;
if (stack>it.maxStack)
{
string reason = string.Format("Item Stack Hack Detected: player has {0} {1}(s) in one stack", stack,itemname);
TShock.Utils.HandleCheater(args.Player, reason);
}
return false;
}