mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-31 01:09:18 +02:00
bugfixes, ui changes, rds reset feature
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user