1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-27 06:23:53 +01:00

bugfixes, ui changes, rds reset feature

This commit is contained in:
NoobishSVK
2024-01-29 23:32:00 +01:00
parent 6e25e0b1dd
commit 525ae519d7
7 changed files with 105 additions and 27 deletions

View File

@@ -67,9 +67,14 @@ wss.on('connection', (ws, request) => {
});
ws.on('message', (message) => {
logDebug('Received message from client:', message.toString());
logDebug('Command received from \x1b[90m' + request.connection.remoteAddress + '\x1b[0m:', message.toString());
command = message.toString();
client.write(command + "\n");
if(command.startsWith('X')) {
logWarn('Remote tuner shutdown attempted by \x1b[90m' + request.connection.remoteAddress + '\x1b[0m. You may consider blocking this user.');
} else {
client.write(command + "\n");
}
});
ws.on('close', (code, reason) => {