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 x = args.Data.ReadInt32();
|
||||||
var y = 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;
|
return true;
|
||||||
args.Player.RequestedSections.Add(new Vector2(x, y));
|
}
|
||||||
|
args.Player.RequestedSection = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ namespace TShockAPI
|
||||||
public bool HasBeenNaggedAboutLoggingIn;
|
public bool HasBeenNaggedAboutLoggingIn;
|
||||||
public bool TpLock = false;
|
public bool TpLock = false;
|
||||||
Player FakePlayer;
|
Player FakePlayer;
|
||||||
public List<Vector2> RequestedSections = new List<Vector2>();
|
public bool RequestedSection = false;
|
||||||
public DateTime LastDeath { get; set; }
|
public DateTime LastDeath { get; set; }
|
||||||
public bool ForceSpawn = false;
|
public bool ForceSpawn = false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue