diff --git a/Plugins/Mineplex.Core/src/mineplex/core/chat/SpamHandler.java b/Plugins/Mineplex.Core/src/mineplex/core/chat/SpamHandler.java index ba285dde5..6b1b1c9b4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/chat/SpamHandler.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/chat/SpamHandler.java @@ -23,6 +23,8 @@ import net.minecraft.server.v1_8_R3.PacketPlayInChat; public class SpamHandler implements IPacketHandler { + private static final int DETECTION_THRESHOLD = 30; + private final Cache _recentChat = CacheBuilder.newBuilder().expireAfterWrite(500, TimeUnit.MILLISECONDS).build(); public SpamHandler() @@ -66,7 +68,7 @@ public class SpamHandler implements IPacketHandler _recentChat.put(mapKey, newValue); - if (newValue >= 10) + if (newValue >= DETECTION_THRESHOLD) { SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, "#spam-alert", new SlackMessage("Spambot Alert System", "heavy_exclamation_mark", "A spambot threat was detected on " + UtilServer.getRegion().name() + " " + UtilServer.getServerName() + ": MSG=\"" + message + "\" & OCCURRENCES=" + newValue), true); return true;