Disallow shell commands on channels
This commit is contained in:
parent
a840b9a1de
commit
bb0c8ec452
4
ubot.py
4
ubot.py
@ -88,6 +88,10 @@ async def edit(event):
|
|||||||
await client.send_message('me', rpl)
|
await client.send_message('me', rpl)
|
||||||
|
|
||||||
if '.sh' in msg:
|
if '.sh' in msg:
|
||||||
|
if event.is_channel and not event.is_group:
|
||||||
|
await event.edit('Sorry, this is not allowed!')
|
||||||
|
return
|
||||||
|
|
||||||
cmd = msg.split(' ', 1)[1]
|
cmd = msg.split(' ', 1)[1]
|
||||||
host = os.uname()[1]
|
host = os.uname()[1]
|
||||||
user = os.environ['USER']
|
user = os.environ['USER']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user