mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 07:39:42 +01:00
Improved some grammar and variable names
This commit is contained in:
parent
a176aba350
commit
579b7e7b97
@ -545,14 +545,14 @@ public final class Settings extends YamlConfiguration {
|
||||
try {
|
||||
return DataSource.DataSourceType.valueOf(configFile.getString(key, "sqlite").toUpperCase());
|
||||
} catch (IllegalArgumentException ex) {
|
||||
ConsoleLogger.showError("Unknown database backend; defaulting to sqlite database");
|
||||
ConsoleLogger.showError("Unknown database backend; defaulting to SQLite database");
|
||||
return DataSource.DataSourceType.SQLITE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Config option for setting and check restricted user by username;ip ,
|
||||
* return false if ip and name doesnt amtch with player that join the
|
||||
* return false if ip and name doesn't match with player that join the
|
||||
* server, so player has a restricted access
|
||||
* @param name String
|
||||
* @param ip String
|
||||
@ -560,21 +560,21 @@ public final class Settings extends YamlConfiguration {
|
||||
* @return boolean */
|
||||
public static boolean getRestrictedIp(String name, String ip) {
|
||||
|
||||
Iterator<String> iter = getRestrictedIp.iterator();
|
||||
boolean trueonce = false;
|
||||
boolean namefound = false;
|
||||
while (iter.hasNext()) {
|
||||
String[] args = iter.next().split(";");
|
||||
String testname = args[0];
|
||||
String testip = args[1];
|
||||
if (testname.equalsIgnoreCase(name)) {
|
||||
namefound = true;
|
||||
if (testip.equalsIgnoreCase(ip)) {
|
||||
trueonce = true;
|
||||
Iterator<String> iterator = getRestrictedIp.iterator();
|
||||
boolean trueOnce = false;
|
||||
boolean nameFound = false;
|
||||
while(iterator.hasNext()) {
|
||||
String[] args = iterator.next().split(";");
|
||||
String testName = args[0];
|
||||
String testIp = args[1];
|
||||
if (testName.equalsIgnoreCase(name)) {
|
||||
nameFound = true;
|
||||
if (testIp.equalsIgnoreCase(ip)) {
|
||||
trueOnce = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return !namefound || trueonce;
|
||||
return !nameFound || trueOnce;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user