Merge pull request #1320 from DogooFalchion/fix_playerlogin
Ensure IPs are > 0 otherwise the Linq will fail.
This commit is contained in:
commit
3fdc89a576
1 changed files with 10 additions and 8 deletions
|
|
@ -409,6 +409,8 @@ namespace TShockAPI
|
|||
KnownIps = JsonConvert.DeserializeObject<List<String>>(args.Player.User.KnownIps);
|
||||
}
|
||||
|
||||
if (KnownIps.Count > 0)
|
||||
{
|
||||
bool last = KnownIps.Last() == args.Player.IP;
|
||||
if (!last)
|
||||
{
|
||||
|
|
@ -419,7 +421,7 @@ namespace TShockAPI
|
|||
|
||||
KnownIps.Add(args.Player.IP);
|
||||
}
|
||||
|
||||
}
|
||||
args.Player.User.KnownIps = JsonConvert.SerializeObject(KnownIps, Formatting.Indented);
|
||||
Users.UpdateLogin(args.Player.User);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue