diff options
author | Nassim Jahnke <[email protected]> | 2023-03-14 18:11:24 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2023-03-14 18:11:24 +0100 |
commit | 2ed604cf725820344878b0d49117bd5ef31463bc (patch) | |
tree | 701daae297f65de2ae3b2cc233047e7903adcb51 /patches/server/0108-Configurable-packet-in-spam-threshold.patch | |
parent | 155aa36d89b260ef5841615899299756b5983c0a (diff) | |
download | Paper-2ed604cf725820344878b0d49117bd5ef31463bc.tar.gz Paper-2ed604cf725820344878b0d49117bd5ef31463bc.zip |
Start working on 1.19.4
Diffstat (limited to 'patches/server/0108-Configurable-packet-in-spam-threshold.patch')
-rw-r--r-- | patches/server/0108-Configurable-packet-in-spam-threshold.patch | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/patches/server/0108-Configurable-packet-in-spam-threshold.patch b/patches/server/0108-Configurable-packet-in-spam-threshold.patch deleted file mode 100644 index 657327e01d..0000000000 --- a/patches/server/0108-Configurable-packet-in-spam-threshold.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown <[email protected]> -Date: Sun, 11 Sep 2016 14:30:57 -0500 -Subject: [PATCH] Configurable packet in spam threshold - - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8bed76ec7692a75f12e724a36f3dd9050760b7ea..481ddcf40d1e96d162b0e28737a71fb390e8715d 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1604,13 +1604,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - // Spigot start - limit place/interactions - private int limitedPackets; - private long lastLimitedPacket = -1; -+ private static final int THRESHOLD = io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold; // Paper - Configurable threshold - - private boolean checkLimit(long timestamp) { -- if (this.lastLimitedPacket != -1 && timestamp - this.lastLimitedPacket < 30 && this.limitedPackets++ >= 4) { -+ if (this.lastLimitedPacket != -1 && timestamp - this.lastLimitedPacket < THRESHOLD && this.limitedPackets++ >= 8) { // Paper - Use threshold, raise packet limit to 8 - return false; - } - -- if (this.lastLimitedPacket == -1 || timestamp - this.lastLimitedPacket >= 30) { -+ if (this.lastLimitedPacket == -1 || timestamp - this.lastLimitedPacket >= THRESHOLD) { // Paper - this.lastLimitedPacket = timestamp; - this.limitedPackets = 0; - return true; |