Max Stack and Stat Hack detection permissions implemented.
This commit is contained in:
parent
34efba9c1f
commit
24431017e6
3 changed files with 30 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ namespace TShockAPI
|
|||
item.netDefaults(type);
|
||||
item.Prefix(prefix);
|
||||
|
||||
if (stack > item.maxStack && type != 0 && args.Player.IgnoreActionsForCheating != "none")
|
||||
if (stack > item.maxStack && type != 0 && args.Player.IgnoreActionsForCheating != "none" && !args.Player.Group.HasPermission(Permissions.ignorestackhackdetection))
|
||||
{
|
||||
args.Player.IgnoreActionsForCheating = "Item Hack: " + item.name + " (" + stack + ") exceeds max stack of " + item.maxStack;
|
||||
}
|
||||
|
|
@ -331,11 +331,16 @@ namespace TShockAPI
|
|||
return true;
|
||||
|
||||
args.Player.RequestedSection = true;
|
||||
if (TShock.HackedHealth(args.Player))
|
||||
if (TShock.HackedHealth(args.Player) && !args.Player.Group.HasPermission(Permissions.ignorestathackdetection))
|
||||
{
|
||||
TShock.Utils.ForceKick(args.Player, "You have Hacked Health/Mana, Please use a different character.");
|
||||
}
|
||||
|
||||
if (!args.Player.Group.HasPermission(Permissions.ignorestackhackdetection))
|
||||
{
|
||||
TShock.HackedInventory(args.Player);
|
||||
}
|
||||
|
||||
if (TShock.Utils.ActivePlayers() + 1 > TShock.Config.MaxSlots && !args.Player.Group.HasPermission(Permissions.reservedslot))
|
||||
{
|
||||
TShock.Utils.ForceKick(args.Player, TShock.Config.ServerFullReason);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue