forked from swee/MeowNex
Update sweebot.py
This commit is contained in:
parent
ed5e0e93f3
commit
52ddc0c7ac
1 changed files with 14 additions and 3 deletions
17
sweebot.py
17
sweebot.py
|
@ -1,6 +1,4 @@
|
||||||
#0.0.1p4
|
__version__ = "0.0.1 patch 5"
|
||||||
version_unpretty = "0.0.1p4"
|
|
||||||
__version__ = "0.0.1 patch 4"
|
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
from time import sleep, time, ctime
|
from time import sleep, time, ctime
|
||||||
|
@ -293,6 +291,19 @@ while True:
|
||||||
block+=1
|
block+=1
|
||||||
run-=1
|
run-=1
|
||||||
update()
|
update()
|
||||||
|
|
||||||
|
elif command[0] == "$pull":
|
||||||
|
if perms == "full" or "reboot" in perms.split(",") or "restart" in perms.split(","):
|
||||||
|
ossystem("git fetch")
|
||||||
|
ossystem("git pull")
|
||||||
|
irc.send_irc(channel, nick + ": Pulled from Git, restarting bot...")
|
||||||
|
sleep(1)
|
||||||
|
ossystem("sudo systemctl restart sweebot")
|
||||||
|
else:
|
||||||
|
irc.send_irc(channel, nick + ": Permission denied.")
|
||||||
|
block+=1
|
||||||
|
run-=1
|
||||||
|
update()
|
||||||
|
|
||||||
elif command[0] == "$join":
|
elif command[0] == "$join":
|
||||||
if perms == "full" or "join" in perms.split(","):
|
if perms == "full" or "join" in perms.split(","):
|
||||||
|
|
Loading…
Reference in a new issue