Merge branch 'general-devel' of github.com:NyxStudios/TShock into general-devel
This commit is contained in:
commit
6f723820a0
1 changed files with 10 additions and 8 deletions
|
|
@ -409,17 +409,19 @@ namespace TShockAPI
|
|||
KnownIps = JsonConvert.DeserializeObject<List<String>>(args.Player.User.KnownIps);
|
||||
}
|
||||
|
||||
bool last = KnownIps.Last() == args.Player.IP;
|
||||
if (!last)
|
||||
if (KnownIps.Count > 0)
|
||||
{
|
||||
if (KnownIps.Count == 100)
|
||||
bool last = KnownIps.Last() == args.Player.IP;
|
||||
if (!last)
|
||||
{
|
||||
KnownIps.RemoveAt(0);
|
||||
if (KnownIps.Count == 100)
|
||||
{
|
||||
KnownIps.RemoveAt(0);
|
||||
}
|
||||
|
||||
KnownIps.Add(args.Player.IP);
|
||||
}
|
||||
|
||||
KnownIps.Add(args.Player.IP);
|
||||
}
|
||||
|
||||
args.Player.User.KnownIps = JsonConvert.SerializeObject(KnownIps, Formatting.Indented);
|
||||
Users.UpdateLogin(args.Player.User);
|
||||
}
|
||||
|
|
@ -1170,7 +1172,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
|
||||
if (!Config.AllowCrimsonCreep && (args.Type == TileID.Dirt || args.Type == TileID.FleshWeeds
|
||||
|| TileID.Sets.Crimson[args.Type]))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue