ping in ws

This commit is contained in:
2026-07-14 09:33:24 +02:00
parent a239d9dfad
commit 5360930267
2 changed files with 23 additions and 77 deletions
+6
View File
@@ -110,6 +110,12 @@ wss.on('connection', (ws, request) => {
ws.on('message', (message) => {
const command = helpers.antispamProtection(message, clientIp, ws, userCommands, lastWarn, userCommandHistory, '18', 'text', 16 * 1024);
if(!command) return;
if(command.startsWith("PING")) {
ws.send(command);
return;
}
if (!clientIp.includes("127.0.0.1")) {
if (((command.startsWith('X') || command.startsWith('Y')) && !helpers.isAdmin(req)) ||