From 688248e6f0be0fb61f432bb9ef3740f140da8cf2 Mon Sep 17 00:00:00 2001 From: Battlefield Duck Date: Wed, 22 Nov 2023 05:22:58 +0800 Subject: [PATCH] Fix Epic Online Services (EOS) Protocol --- discordgsm/protocols/beammp.py | 2 +- discordgsm/protocols/factorio.py | 2 +- discordgsm/protocols/front.py | 2 +- discordgsm/protocols/nwn1.py | 2 +- discordgsm/protocols/nwn2.py | 2 +- discordgsm/protocols/scum.py | 2 +- requirements.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/discordgsm/protocols/beammp.py b/discordgsm/protocols/beammp.py index 6f80ea8..70eb305 100644 --- a/discordgsm/protocols/beammp.py +++ b/discordgsm/protocols/beammp.py @@ -38,7 +38,7 @@ async def query(self): await self.pre_query() host, port = str(self.kv['host']), int(str(self.kv['port'])) - ip = SocketAsync.gethostbyname(host) + ip = await SocketAsync.gethostbyname(host) key = f'{ip}:{port}' if key not in BeamMP.master_servers: diff --git a/discordgsm/protocols/factorio.py b/discordgsm/protocols/factorio.py index fb34616..8a086e9 100644 --- a/discordgsm/protocols/factorio.py +++ b/discordgsm/protocols/factorio.py @@ -40,7 +40,7 @@ async def query(self): await self.pre_query() host, port = str(self.kv['host']), int(str(self.kv['port'])) - ip = SocketAsync.gethostbyname(host) + ip = await SocketAsync.gethostbyname(host) host_address = f'{ip}:{port}' if host_address not in Factorio.master_servers: diff --git a/discordgsm/protocols/front.py b/discordgsm/protocols/front.py index 349eeeb..398fd3b 100644 --- a/discordgsm/protocols/front.py +++ b/discordgsm/protocols/front.py @@ -71,7 +71,7 @@ async def query(self): info = await source.get_info() ping = int((time.time() - start) * 1000) - ip = SocketAsync.gethostbyname(host) + ip = await SocketAsync.gethostbyname(host) host_address = f'{ip}:{info["GamePort"]}' if host_address not in Front.master_servers: diff --git a/discordgsm/protocols/nwn1.py b/discordgsm/protocols/nwn1.py index 360e53d..9713a15 100644 --- a/discordgsm/protocols/nwn1.py +++ b/discordgsm/protocols/nwn1.py @@ -53,7 +53,7 @@ async def query(self): await self.pre_query() host, port = str(self.kv['host']), int(str(self.kv['port'])) - ip = SocketAsync.gethostbyname(host) + ip = await SocketAsync.gethostbyname(host) key = f'{ip}:{port}' if key not in NWN1.master_servers: diff --git a/discordgsm/protocols/nwn2.py b/discordgsm/protocols/nwn2.py index edc3cee..2986d89 100644 --- a/discordgsm/protocols/nwn2.py +++ b/discordgsm/protocols/nwn2.py @@ -53,7 +53,7 @@ async def query(self): await self.pre_query() host, port = str(self.kv['host']), int(str(self.kv['port'])) - ip = SocketAsync.gethostbyname(host) + ip = await SocketAsync.gethostbyname(host) key = f'{ip}:{port}' if key not in NWN2.master_servers: diff --git a/discordgsm/protocols/scum.py b/discordgsm/protocols/scum.py index fb29579..47d3628 100644 --- a/discordgsm/protocols/scum.py +++ b/discordgsm/protocols/scum.py @@ -23,7 +23,7 @@ async def query(self): await self.pre_query() host, port = str(self.kv['host']), int(str(self.kv['port'])) - ip = SocketAsync.gethostbyname(host) + ip = await SocketAsync.gethostbyname(host) host_address = f'{ip}:{port}' if host_address not in Scum.master_servers: diff --git a/requirements.txt b/requirements.txt index b4b311a..f134129 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ backports.zoneinfo==0.2.1;python_version<"3.9" discord.py==2.3.2 flask[async]==3.0.0 gunicorn==21.2.0 -opengsq==2.2.2 +opengsq==2.2.3 psycopg2-binary==2.9.9 pymongo==4.5.0 python-dotenv==1.0.0