Skip to content

Commit

Permalink
Ignore more known BattlEye server messages
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamecracks committed Jul 17, 2023
1 parent ab3177a commit 137b10b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ Changelog
:depth: 2
:local:

Latest
------

Bug Fixes
^^^^^^^^^

* Ignore more known server messages in :py:class:`~berconpy.client.RCONClient`

* Ban check timed out, no response from BE Master
* Disconnected from BE Master
* Failed to resolve BE Master DNS name(s)

v2.1.0
------

Expand Down
7 changes: 6 additions & 1 deletion src/berconpy/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ def _get_pattern_kwargs(m: re.Match) -> dict:

def is_expected_message(message: str) -> bool:
"""Determines if a server message is expected."""
return message == "Connected to BE Master"
return message in (
"Ban check timed out, no response from BE Master",
"Connected to BE Master",
"Disconnected from BE Master",
"Failed to resolve BE Master DNS name(s)",
)


def parse_admins(response: str) -> Iterator[ParsedAdmin]:
Expand Down

0 comments on commit 137b10b

Please sign in to comment.