mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 09:10:01 +01:00
Fix wrong logic (my fault)
This commit is contained in:
parent
6285a2137f
commit
6af65e6cd4
@ -362,7 +362,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
|
||||
String nickRegEx = settings.getProperty(RestrictionSettings.ALLOWED_NICKNAME_CHARACTERS);
|
||||
Pattern nickPattern = Pattern.compile(nickRegEx);
|
||||
if (nickPattern.matcher(player.getName()).matches() || name.equalsIgnoreCase("Player")) {
|
||||
if (name.equalsIgnoreCase("Player") || !nickPattern.matcher(player.getName()).matches()) {
|
||||
event.setKickMessage(m.retrieveSingle(MessageKey.INVALID_NAME_CHARACTERS).replace("REG_EX", nickRegEx));
|
||||
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
|
||||
return;
|
||||
|
@ -61,7 +61,7 @@ public final class Settings {
|
||||
getSessionTimeout = configFile.getInt("settings.sessions.timeout", 10);
|
||||
getMaxNickLength = configFile.getInt("settings.restrictions.maxNicknameLength", 20);
|
||||
getMinNickLength = configFile.getInt("settings.restrictions.minNicknameLength", 3);
|
||||
getNickRegex = configFile.getString("settings.restrictions.allowedNicknameCharacters", "[a-zA-Z0-9_?]*");
|
||||
getNickRegex = load(RestrictionSettings.ALLOWED_NICKNAME_CHARACTERS);
|
||||
nickPattern = Pattern.compile(getNickRegex);
|
||||
isAllowRestrictedIp = load(RestrictionSettings.ENABLE_RESTRICTED_USERS);
|
||||
isRemoveSpeedEnabled = load(RestrictionSettings.REMOVE_SPEED);
|
||||
|
Loading…
Reference in New Issue
Block a user