From 3456e14d04168e2e53e83a9b103c2d496dfdfa37 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 2 May 2022 07:35:15 -0400 Subject: [PATCH] Fixes issue where max allowed keyclones was hardcoded and not pulled from the config. --- src/engine/net/client/handlers/KeyCloneAudit.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/handlers/KeyCloneAudit.java b/src/engine/net/client/handlers/KeyCloneAudit.java index 94e7a162..aa9f65fb 100644 --- a/src/engine/net/client/handlers/KeyCloneAudit.java +++ b/src/engine/net/client/handlers/KeyCloneAudit.java @@ -1,5 +1,6 @@ package engine.net.client.handlers; +import engine.gameManager.ConfigManager; import engine.gameManager.DbManager; import engine.objects.Group; import engine.objects.PlayerCharacter; @@ -19,14 +20,11 @@ public enum KeyCloneAudit { if (machineID.equals(member.getClientConnection().machineID)) machineCount = machineCount + 1; - // (int) ConfigManager.WORLDSERVER.config.get("keyclone") - if (machineCount > 4) { + if (machineCount > Integer.parseInt(ConfigManager.MB_WORLD_KEYCLONE_MAX.getValue())) { Logger.error("Keyclone detected from: " + player.getAccount().getUname() + " with machine count of: " + machineCount); DbManager.AccountQueries.SET_TRASH(machineID); } - // Refactor to separate file to log keyclones - // DbManager.AccountQueries.EMPTY_TRASH(machineID); } }