diff --git a/opengsq/protocols/flatout2.py b/opengsq/protocols/flatout2.py index 30e1345..134bedd 100644 --- a/opengsq/protocols/flatout2.py +++ b/opengsq/protocols/flatout2.py @@ -232,10 +232,6 @@ def _verify_packet(self, data: bytes) -> bool: if len(data) < 14: # Minimum length for header + session ID + padding + game ID return False - # Check response header - accept any of the valid response headers - response_header = data[:2] - header_valid = response_header in self.RESPONSE_HEADERS - # Check game identifier (position 10-14, after session ID and padding) # This is the most reliable indicator for Flatout 2 servers game_id = data[10:14] diff --git a/opengsq/protocols/udk.py b/opengsq/protocols/udk.py index d9b0302..c5a151a 100644 --- a/opengsq/protocols/udk.py +++ b/opengsq/protocols/udk.py @@ -68,22 +68,22 @@ def _parse_response(self, buffer: bytes) -> dict: # Parse connection info num_open_public_conn = struct.unpack("!I", br.read_bytes(4))[0] - num_open_private_conn = struct.unpack("!I", br.read_bytes(4))[0] + _ = struct.unpack("!I", br.read_bytes(4))[0] # num_open_private_conn num_public_conn = struct.unpack("!I", br.read_bytes(4))[0] - num_private_conn = struct.unpack("!I", br.read_bytes(4))[0] + _ = struct.unpack("!I", br.read_bytes(4))[0] # num_private_conn # Parse flags - should_advertise = br.read_bytes(1)[0] == 1 + _ = br.read_bytes(1)[0] == 1 # should_advertise is_lan_match = br.read_bytes(1)[0] == 1 uses_stats = br.read_bytes(1)[0] == 1 - allow_join_in_progress = br.read_bytes(1)[0] == 1 - allow_invites = br.read_bytes(1)[0] == 1 - uses_presence = br.read_bytes(1)[0] == 1 - allow_join_via_presence = br.read_bytes(1)[0] == 1 - uses_arbitration = br.read_bytes(1)[0] == 1 + _ = br.read_bytes(1)[0] == 1 # allow_join_in_progress + _ = br.read_bytes(1)[0] == 1 # allow_invites + _ = br.read_bytes(1)[0] == 1 # uses_presence + _ = br.read_bytes(1)[0] == 1 # allow_join_via_presence + _ = br.read_bytes(1)[0] == 1 # uses_arbitration if self.packet_version >= 5: - anti_cheat_protected = br.read_bytes(1)[0] == 1 + _ = br.read_bytes(1)[0] == 1 # anti_cheat_protected # Read owner info owner_id = br.read_bytes(8) diff --git a/opengsq/protocols/w40kdow.py b/opengsq/protocols/w40kdow.py index 7541a5d..e29219b 100644 --- a/opengsq/protocols/w40kdow.py +++ b/opengsq/protocols/w40kdow.py @@ -154,9 +154,7 @@ def _parse_broadcast(self, data: bytes, addr: tuple) -> Status: # Read unknown ASCII field (appears to be a version like "1.0", length in bytes) unknown_ascii_len = br.read_long(unsigned=True) - unknown_ascii = br.read_bytes(unknown_ascii_len).decode( - "ascii", errors="ignore" - ) + _ = br.read_bytes(unknown_ascii_len) # unknown_ascii, skip for now # Read map/scenario name (UTF-16LE with length in code units) map_scenario_len_units = br.read_long(unsigned=True) diff --git a/opengsq/protocols/warcraft3.py b/opengsq/protocols/warcraft3.py index 76d0353..9f01bd6 100644 --- a/opengsq/protocols/warcraft3.py +++ b/opengsq/protocols/warcraft3.py @@ -183,9 +183,9 @@ async def get_status(self) -> Status: slots_total = int.from_bytes(br.read_bytes(4), "little") game_flags = GameFlags(int.from_bytes(br.read_bytes(4), "little")) slots_used = int.from_bytes(br.read_bytes(4), "little") - slots_available = int.from_bytes(br.read_bytes(4), "little") - uptime_seconds = int.from_bytes(br.read_bytes(4), "little") - port = int.from_bytes(br.read_bytes(2), "little") + _ = int.from_bytes(br.read_bytes(4), "little") # slots_available + _ = int.from_bytes(br.read_bytes(4), "little") # uptime_seconds + _ = int.from_bytes(br.read_bytes(2), "little") # port # Store raw data for debugging raw = {