From 32c510ede8efc5d13cdc9c542a551b3d27003858 Mon Sep 17 00:00:00 2001 From: swee Date: Sun, 15 Dec 2024 19:30:22 -0800 Subject: [PATCH] Update server.py --- server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.py b/server.py index bbcab33..3a295ec 100644 --- a/server.py +++ b/server.py @@ -21,6 +21,7 @@ motd = """ https://ircat.xyz This server's configuration doesn't have a MOTD in its configuration, or is invalid.""" motd_file = None +ping_timeout = 255 with open(sys.argv[1], 'r') as file: data = yaml.safe_load(file) try: server = data["host"] @@ -39,6 +40,8 @@ with open(sys.argv[1], 'r') as file: except: print("using fallback MOTD") try: motd_file = data["motd-file"] except: print("Not reading MOTD from a file.") + try: ping_timeout = int(data["ping-timeout"]) + except: print("Using 255 as a ping timeout.") file.close() print("Successfully loaded config!") class IRCat_DATA_BROKER: