Update sweebot.py

This commit is contained in:
Swee 2024-09-22 13:52:02 -07:00
parent ed5e0e93f3
commit 52ddc0c7ac

View file

@ -1,6 +1,4 @@
#0.0.1p4
version_unpretty = "0.0.1p4"
__version__ = "0.0.1 patch 4"
__version__ = "0.0.1 patch 5"
import socket
import subprocess
from time import sleep, time, ctime
@ -293,6 +291,19 @@ while True:
block+=1
run-=1
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":
if perms == "full" or "join" in perms.split(","):