From a840b9a1de4ac115537f0eedb040619494cb86a6 Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Sun, 21 Mar 2021 20:57:28 +0100 Subject: [PATCH] Use USER variable for username --- ubot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubot.py b/ubot.py index 1f694ce..a4e0a56 100644 --- a/ubot.py +++ b/ubot.py @@ -90,7 +90,7 @@ async def edit(event): if '.sh' in msg: cmd = msg.split(' ', 1)[1] host = os.uname()[1] - user = os.environ['LOGNAME'] + user = os.environ['USER'] out = os.popen(cmd).read() rpl = '`' + user + '@' + host + ' $ ' + cmd + '`\n'