Fixes issue where max allowed keyclones was hardcoded and not pulled from the config.

This commit is contained in:
2022-05-02 07:35:15 -04:00
parent c45491a3d2
commit 3456e14d04
@@ -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);
}
}