Enhance Valve protocol support

44 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: 15 Jan Comments: 2

Comments: 2