Browse Source

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

pull/2/head
MagicBot 3 years ago
parent
commit
3456e14d04
  1. 6
      src/engine/net/client/handlers/KeyCloneAudit.java

6
src/engine/net/client/handlers/KeyCloneAudit.java

@ -1,5 +1,6 @@ @@ -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 { @@ -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);
}
}

Loading…
Cancel
Save