Enhance Valve protocol support

33 votes

When querying the server via valve protocol user names are blank
```python
from valve.source.a2s import ServerQuerier
addr = ("IP.Ad.dr.ess", port)
with ServerQuerier(addr) as server:
players = server.players()
for player in players["players"]:
print(f"Index: '{p['index']}', Name: '{p['name']}', Score: '{p['score']}', Duration: '{p['duration']}'")
```
due to the way it works there's a caveat that you should only count players if they have names from this list. Which due to this bug it would show player count 0.
https://python-valve.readthedocs.io/en/latest/source.html#valve.source.a2s.ServerQuerier.players

Under consideration Suggested by: ibigpapa Upvoted: yesterday Comments: 2

Comments: 2

Add a comment

0 / 1,000

* Your name will be publicly visible

* Email won't be displayed on screen