Changed how abuse of TileGetSection is handled.

(2nd request will cause a kick) - Thanks Lycaonj and UndeadMiner.
This commit is contained in:
Deathmax 2011-08-22 19:16:27 +08:00
parent a6132a31a2
commit cf9157bc94
2 changed files with 6 additions and 3 deletions

View file

@ -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;
}
}