Allow spaces when checking 2FA codes
This commit is contained in:
parent
fded8a6583
commit
8fdbe87d1d
@ -180,7 +180,7 @@ public class TwoFactorAuth extends MiniClientPlugin<TwoFactorData>
|
||||
|
||||
TwoFactorData data = Get(player);
|
||||
|
||||
if (data.getLastLoginIp().isPresent() && player.getAddress().getAddress().toString().substring(1).equals(data.getLastLoginIp().get()) || _clientManager.Get(player).GetRank(true) == Rank.SUPPORT)
|
||||
if ((data.getLastLoginIp().isPresent() && player.getAddress().getAddress().toString().substring(1).equals(data.getLastLoginIp().get())) || _clientManager.Get(player).GetRank(true) == Rank.SUPPORT)
|
||||
{
|
||||
player.sendMessage(F.main("2FA", "Authenticated"));
|
||||
return;
|
||||
@ -241,7 +241,7 @@ public class TwoFactorAuth extends MiniClientPlugin<TwoFactorData>
|
||||
int code;
|
||||
try
|
||||
{
|
||||
code = Integer.parseInt(event.getMessage());
|
||||
code = Integer.parseInt(event.getMessage().replaceAll(" ", ""));
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user