From d5d957a91062ef2cf80c250359dff6a97b9603e6 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 6 Jun 2022 03:21:27 -0400 Subject: [PATCH] bugfix: ignore case with boolean config values. --- src/engine/db/archive/DataWarehouse.java | 2 +- src/engine/gameManager/MaintenanceManager.java | 2 +- src/engine/server/login/LoginServerMsgHandler.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/db/archive/DataWarehouse.java b/src/engine/db/archive/DataWarehouse.java index 3947d72d..5483e18b 100644 --- a/src/engine/db/archive/DataWarehouse.java +++ b/src/engine/db/archive/DataWarehouse.java @@ -39,7 +39,7 @@ public class DataWarehouse implements Runnable { // If WarehousePush is disabled // then early exit - if ( ConfigManager.MB_WORLD_WAREHOUSE_PUSH.getValue().equals("false")) { + if ( ConfigManager.MB_WORLD_WAREHOUSE_PUSH.getValue().equalsIgnoreCase("false")) { Logger.info("Warehouse Remote Connection disabled along with push"); return; } diff --git a/src/engine/gameManager/MaintenanceManager.java b/src/engine/gameManager/MaintenanceManager.java index 35185ebd..89ef12a3 100644 --- a/src/engine/gameManager/MaintenanceManager.java +++ b/src/engine/gameManager/MaintenanceManager.java @@ -349,7 +349,7 @@ public enum MaintenanceManager { // Run maintenance on player buildings - if ((boolean) ConfigManager.MB_WORLD_MAINTENANCE.getValue().equals("true")) + if ((boolean) ConfigManager.MB_WORLD_MAINTENANCE.getValue().equalsIgnoreCase("true")) processBuildingMaintenance(); else Logger.info("Maintenance Costings: DISABLED"); diff --git a/src/engine/server/login/LoginServerMsgHandler.java b/src/engine/server/login/LoginServerMsgHandler.java index 36f45917..3fd17ed5 100644 --- a/src/engine/server/login/LoginServerMsgHandler.java +++ b/src/engine/server/login/LoginServerMsgHandler.java @@ -180,7 +180,7 @@ public class LoginServerMsgHandler implements NetMsgHandler { if (account == null) { - if (ConfigManager.MB_LOGIN_AUTOREG.getValue().equals("FALSE")) { + if (ConfigManager.MB_LOGIN_AUTOREG.getValue().equalsIgnoreCase("false")) { this.KickToLogin(MBServerStatics.LOGINERROR_INVALID_USERNAME_PASSWORD, "Could not find account (" + uname + ')', clientConnection); Logger.info("Could not find account (" + uname + ')'); return;