Rcon now pulls from RCon row

This commit is contained in:
officereso 2020-02-26 20:58:12 -06:00
parent 1e17a22dda
commit ec8ef40e46
2 changed files with 8 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def change(ip1, ip2):
cur.execute(f"SELECT * FROM Bot.McServer where serverIP = {ip2}")
server2 = cur.fetchall()
cur.execute("SELECT serverIP FROM Bot.McServer ORDER BY serverIP DESC")
cur.execute("SELECT serverRCON FROM Bot.McServer ORDER BY serverRCON DESC")
allServerRcon = cur.fetchall()
os.system("systemctl stop mc mcL mcP mcEvent1 mcEvent2")

View File

@ -0,0 +1,7 @@
from mcrcon import MCRcon
allServerRcon = []
for i in range(len(allServerRcon)):
with MCRcon("192.168.1.52", "f{password}", allServerRcon[i]) as mcr:
mcr.command("stop")