Changes region allow to use IP addresses rather than names. Cancels out name spoofing.

This commit is contained in:
Twitchy 2011-06-23 16:11:58 +12:00
parent 640382d898
commit c45696efb2
4 changed files with 49 additions and 24 deletions

View file

@ -216,7 +216,7 @@ namespace TShockAPI
return true;
}
}
if (!args.Player.Group.HasPermission("editspawn") && RegionManager.InProtectedArea(x, y, args.Player.Name))
if (!args.Player.Group.HasPermission("editspawn") && RegionManager.InProtectedArea(x, y, Tools.GetPlayerIP(args.Player.Name)))
{
args.Player.SendMessage("Region protected from changes.", Color.Red);
args.Player.SendTileSquare(x, y);