mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-30 00:39:16 +02:00
ping in ws
This commit is contained in:
@@ -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)) ||
|
||||
|
||||
Reference in New Issue
Block a user