summaryrefslogtreecommitdiffhomepage
path: root/patches/server/0108-Configurable-packet-in-spam-threshold.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2023-03-14 18:11:24 +0100
committerNassim Jahnke <[email protected]>2023-03-14 18:11:24 +0100
commit2ed604cf725820344878b0d49117bd5ef31463bc (patch)
tree701daae297f65de2ae3b2cc233047e7903adcb51 /patches/server/0108-Configurable-packet-in-spam-threshold.patch
parent155aa36d89b260ef5841615899299756b5983c0a (diff)
downloadPaper-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.patch27
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;