2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-12-23 02:28:01 +00:00

update some logs in configloader

This commit is contained in:
mohammed jasem alaajel 2022-11-16 08:22:30 +04:00
parent 0b9fd6d7ff
commit 8318bcd1bf
No known key found for this signature in database

View File

@ -52,7 +52,7 @@ public interface ConfigLoader {
final boolean useSSL = node.getNode("useSSL").getBoolean(false);
final boolean overrideBungeeCommands = node.getNode("override-bungee-commands").getBoolean(false);
final boolean registerLegacyCommands = node.getNode("register-legacy-commands").getBoolean(false);
String redisPassword = node.getNode("redis-password").getString(null);
String redisPassword = node.getNode("redis-password").getString("");
String proxyId = node.getNode("proxy-id").getString("test-1");
final int maxConnections = node.getNode("max-redis-connections").getInt(10);
List<String> exemptAddresses;
@ -63,15 +63,12 @@ public interface ConfigLoader {
}
// check redis password
if (redisPassword != null && (redisPassword.isEmpty() || redisPassword.equals("none"))) {
if ((redisPassword.isEmpty() || redisPassword.equals("none"))) {
redisPassword = null;
plugin.logWarn("INSECURE setup was detected Please set password for your redis instance.");
plugin.logWarn("password is empty");
}
if (redisPassword == null) {
plugin.logWarn("INSECURE setup was detected Please set password for your redis instance.");
}
if (!useSSL) {
plugin.logWarn("INSECURE setup was detected Please setup ssl for your redis instance.");
if (useSSL) {
plugin.logInfo("Using ssl");
}
// Configuration sanity checks.
if (proxyId == null || proxyId.isEmpty()) {
@ -178,8 +175,6 @@ public interface ConfigLoader {
Path oldConfigPath = dataFolder.resolve("config.yml");
Files.move(oldConfigPath, oldConfigFolder.resolve(UUID.randomUUID() + "_config.yml"));
createConfigFile(dataFolder);
}
}