From d5bd9818fd17381120a777c8e02c97946bc4099b Mon Sep 17 00:00:00 2001 From: Austin Prine Date: Fri, 26 Aug 2022 09:49:09 -0700 Subject: [PATCH] Added configurable delay Made it so you can define how many seconds you want between server status updates. --- cmd-v0.5.py => cmd-v0.6.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename cmd-v0.5.py => cmd-v0.6.py (87%) diff --git a/cmd-v0.5.py b/cmd-v0.6.py similarity index 87% rename from cmd-v0.5.py rename to cmd-v0.6.py index 2546e19..fb94a62 100644 --- a/cmd-v0.5.py +++ b/cmd-v0.6.py @@ -3,6 +3,12 @@ from time import sleep ip = input("Please Enter server IP: ") port = input("Enter Port (press enter for default port 25565, enter 0 if unknown): ") +delay = input("How many seconds do you want in between status updates?: ") + +if delay == "": + delay_int = 0 + +delay_int = int(delay) if port == "": port = "25565" @@ -26,7 +32,7 @@ if port == "0": print(f"players: {status.players.online}/{status.players.max}") print(f"Players Online: {query.players.names}") print("\n") - wait(3) + sleep(delay_int) if port != "0": while True: @@ -42,4 +48,4 @@ if port != "0": print(f"players: {status.players.online}/{status.players.max}") print(f"Players Online: {query.players.names}") print("\n") - wait(3) + sleep(delay_int)