Changed how abuse of TileGetSection is handled.
(2nd request will cause a kick) - Thanks Lycaonj and UndeadMiner.
This commit is contained in:
parent
a6132a31a2
commit
cf9157bc94
2 changed files with 6 additions and 3 deletions
|
|
@ -712,9 +712,12 @@ namespace TShockAPI
|
|||
var x = args.Data.ReadInt32();
|
||||
var y = args.Data.ReadInt32();
|
||||
|
||||
if (args.Player.RequestedSections.Contains(new Vector2(x, y)))
|
||||
if (args.Player.RequestedSection)
|
||||
{
|
||||
Tools.ForceKick(args.Player, "Requested sections more than once.");
|
||||
return true;
|
||||
args.Player.RequestedSections.Add(new Vector2(x, y));
|
||||
}
|
||||
args.Player.RequestedSection = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue