#1005 Improve restricted user feature (performance, error handling)

- Move check for restricted user into validation service
- Keep restrictions in a map by name for fast lookup, avoid splitting Strings on every call
- Gracefully handle case when entry does not have the expected ';' and log exception
This commit is contained in:
ljacqu
2017-03-14 22:26:19 +01:00
parent 62368b1cda
commit 1da74cb987
6 changed files with 148 additions and 45 deletions
@@ -81,7 +81,7 @@ public final class RestrictionSettings implements SettingsHolder {
"Example:",
" AllowedRestrictedUser:",
" - playername;127.0.0.1"})
public static final Property<List<String>> ALLOWED_RESTRICTED_USERS =
public static final Property<List<String>> RESTRICTED_USERS =
newLowercaseListProperty("settings.restrictions.AllowedRestrictedUser");
@Comment("Ban unknown IPs trying to log in with a restricted username?")