1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 14:11:59 +01:00

Normalized IP hotfix

This commit is contained in:
Marek Farkaš
2025-01-22 18:31:49 +01:00
parent 8f8a6af655
commit 11119e8322

View File

@@ -164,6 +164,7 @@ function checkIPv6Support(callback) {
function antispamProtection(message, clientIp, ws, userCommands, lastWarn, userCommandHistory, lengthCommands, endpointName) {
const command = message.toString();
const now = Date.now();
const normalizedClientIp = clientIp?.replace(/^::ffff:/, '');
if (endpointName === 'text') consoleCmd.logDebug(`Command received from \x1b[90m${clientIp}\x1b[0m: ${command}`);
// Initialize user command history if not present