parse usernames
This commit is contained in:
parent
62f98be69d
commit
d0c888a30d
1 changed files with 6 additions and 3 deletions
|
@ -33,9 +33,12 @@ class Rsudo(Cog):
|
|||
log.warning('command channel not found')
|
||||
return
|
||||
|
||||
# parse it, follows format command,uid
|
||||
uid = message.split(',')[-1]
|
||||
command = ','.join(message.split(',')[:-1])
|
||||
# parse it, follows format command,uid,username
|
||||
sp = message.split(',')
|
||||
username = sp[-1]
|
||||
uid = sp[-2]
|
||||
|
||||
command = ','.join(sp[:-2])
|
||||
|
||||
log.info(f'[rsudo] {uid!r} {command!r}')
|
||||
|
||||
|
|
Loading…
Reference in a new issue