« get me outta code hell

basic command log implementation - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-07-15 21:20:39 -0300
committerFlorrie <towerofnix@gmail.com>2020-07-15 21:20:39 -0300
commita2437eafb1a2d7f39c7e816a693ec4f03654b636 (patch)
tree415b9efbf821bf88970caf1a83849d88aae80ef3 /index.js
parent1230a2cfac4b0d907631eddb4d0dc798f5bb3564 (diff)
basic command log implementation
Diffstat (limited to 'index.js')
-rwxr-xr-xindex.js7
1 files changed, 7 insertions, 0 deletions
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']) {