diff --git a/commands/exec.js b/commands/exec.js index 29cc7ed..9e3bb42 100644 --- a/commands/exec.js +++ b/commands/exec.js @@ -12,7 +12,7 @@ async function runCMD(key, cmd, pwd) { return requestData.body.stdout } -async function execute(key, cmd, pwd, conns) { +async function execute(key, cmd, pwd, conns, USERNAME) { const stdout = await runCMD(key, cmd, pwd) console.log(stdout) if (stdout.length > 1800) return console.log("I cannot send stdout to the swarm, its too large!") diff --git a/sshChat.js b/sshChat.js index 835d441..3003983 100644 --- a/sshChat.js +++ b/sshChat.js @@ -168,7 +168,7 @@ async function handleCommand(input) { stats(MYKEY[0]) break; case ">": - execute(MYKEY[0], command.slice(1).join(" "), USERPWD, conns); + execute(MYKEY[0], command.slice(1).join(" "), USERPWD, conns, USERNAME); break; case ">restart": restart(MYKEY[0])