Skip to content

Commit 47501e2

Browse files
Update source.py
1 parent bc174c3 commit 47501e2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

opengsq/protocols/source.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ async def __receive(self, udpClient: UdpClient) -> bytes:
279279
# Packet id
280280
id = br.read_long()
281281
is_compressed = id & 0x80000000 != 0
282-
print(is_compressed)
283282

284283
# Check is GoldSource multi-packet response format
285284
if self.__is_gold_source_split(BinaryReader(br.read())):
@@ -378,13 +377,15 @@ async def __parse_gold_source_packet(self, udpClient: UdpClient, packets: list):
378377
import asyncio
379378

380379
async def main_async():
381-
source = Source(host="146.19.87.161", port=27015, timeout=5.0)
382-
# info = await source.get_info()
383-
# print(info)
380+
# Compressed response
381+
# source = Source(host="146.19.87.161", port=27015, timeout=5.0)
382+
source = Source(host="45.62.160.71", port=27015, timeout=5.0)
383+
info = await source.get_info()
384+
print(info)
384385

385-
# await asyncio.sleep(1)
386-
# players = await source.get_players()
387-
# print(players)
386+
await asyncio.sleep(1)
387+
players = await source.get_players()
388+
print(players)
388389

389390
await asyncio.sleep(1)
390391
rules = await source.get_rules()

0 commit comments

Comments
 (0)