Normalized IP hotfix

This commit is contained in:
Marek Farkaš
2025-01-22 18:44:31 +01:00
parent 8f8a6af655
commit 11119e8322
+1
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