From a2437eafb1a2d7f39c7e816a693ec4f03654b636 Mon Sep 17 00:00:00 2001 From: Florrie Date: Wed, 15 Jul 2020 21:20:39 -0300 Subject: basic command log implementation --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'index.js') diff --git a/index.js b/index.js index 6e83e8a..d628a20 100755 --- a/index.js +++ b/index.js @@ -75,6 +75,7 @@ async function main() { 'player-options': {type: 'series'}, 'stress-test': {type: 'flag'}, 'socket-client': {type: 'value'}, + 'socket-name': {type: 'value'}, 'socket-server': {type: 'value'}, 'telnet-server': {type: 'flag'}, [parseOptions.handleDashless](option) { @@ -170,6 +171,12 @@ async function main() { attachBackendToSocketClient(backend, socketClient, { getPlaylistSources: () => appElement.playlistSources }) + + let nickname = process.env.USER + if (options['socket-name']) { + nickname = options['socket-name'] + } + socketClient.setNickname(nickname) } if (options['stress-test']) { -- cgit 1.3.0-6-gf8a5