From c850e2448bda6a187f814f93a47f6b48b85997b9 Mon Sep 17 00:00:00 2001 From: swee Date: Thu, 26 Dec 2024 16:23:58 -0800 Subject: [PATCH] Update server.py --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 029d8ff..1cf5ebf 100644 --- a/server.py +++ b/server.py @@ -22,7 +22,7 @@ https://ircat.xyz This server doesn't have a MOTD in its configuration, or is invalid.""" motd_file = None ping_timeout = 255 -restrict-ip = '' +restrict_ip = '' with open(sys.argv[1], 'r') as file: data = yaml.safe_load(file) try: server = data["host"] @@ -43,7 +43,7 @@ with open(sys.argv[1], 'r') as file: except: print("Not reading MOTD from a file.") try: ping_timeout = int(data["ping-timeout"]) except: print("Using 255 as a ping timeout.") - try: restrict-ip = data["restrict-ip"] + try: restrict_ip = data["restrict-ip"] except: print("Listening on all hosts possible.") file.close() print("Successfully loaded config!") @@ -71,7 +71,7 @@ config = IRCat_DATA_BROKER() ip = get('https://api.ipify.org').content.decode('utf8') tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) tcp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) -server_address = (restrict-ip, 6667) +server_address = (restrict_ip, 6667) tcp_socket.bind(server_address) tcp_socket.listen(1) opened=True