You've already forked fm-dx-webserver
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:
9
index.js
9
index.js
@@ -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