opengsq / opengsq-python

Python library designed for querying game servers. It supports 24 different query protocols and has been downloaded over 34,000 times.
https://python.opengsq.com/
MIT License
24 stars 3 forks source link

Mordhau module does not show players #1

Closed pblaas closed 2 years ago

pblaas commented 2 years ago

Hi,

I'm currently working on a project to create a mordhau server monitor frontend. For this i'm trying to leverage query tools like a2s but unfortunately i'm unable to get any player stats returned.

Today i stumbled upon your project and tried it with your example; ofcourse with the proper server ip and port. But also I did not get any player stats returned. Do you happen to know what is preventing the player stats from showing and are you able to provide a fix for this in opengsq?

from opengsq import Mordhau

mordhau = Mordhau(address='123.123.123.123', query_port=27015)
server = mordhau.query()

print(server.to_json())

I am getting Player count returned, but an empty player_list array.

{"name": "Specs duelling server", "map": "The Pit", "players": 3, "max_players": 16, "bots": 0, "player_list": [], "latency": 0.20559906959533691}

kind regards, Patrick

BattlefieldDuck commented 2 years ago

Hi, @pblaas

Mordhau does not support player lists on Source Query Protocol (A2S) yet. https://www.battlemetrics.com/servers/mordhau/13471256

But I heard there is a way to get the player list which is using the Source RCON function but I forgot how to do it exactly.

pblaas commented 2 years ago

Hi BattlefieldDuck,

Thank you for quick response. Rcon won't help me since this will be a public available server monitor. I guess I just need to wait until playerlist will become available.

Kind regards, patrick

pblaas commented 2 years ago

I' currently use an RCON implementation to return players from a game. Not ideal but does the job.