From 84bbf692d39c5a28a4cdedcd4f1f73905c20d8ba Mon Sep 17 00:00:00 2001 From: NoobishSVK Date: Sun, 3 Nov 2024 21:27:02 +0100 Subject: [PATCH] filter adjust --- server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index 4c8dd01..887fc11 100644 --- a/server/index.js +++ b/server/index.js @@ -422,7 +422,7 @@ wss.on('connection', (ws, request) => { userCommandHistory[clientIp].push(now); // Remove timestamps older than 10 ms from the history - userCommandHistory[clientIp] = userCommandHistory[clientIp].filter(timestamp => now - timestamp <= 10); + userCommandHistory[clientIp] = userCommandHistory[clientIp].filter(timestamp => now - timestamp <= 20); // Check if there are 3 or more commands in the last 10 ms if (userCommandHistory[clientIp].length >= 5) {