Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are non-source servers supported? ServerQuerier (Mordhau timeout) #75

Open
NotTrying opened this issue May 21, 2019 · 2 comments
Open

Comments

@NotTrying
Copy link

Ive got both source and non-source servers to work but cant get any Mordhau servers to work, Another game I have tried and failed to get any responses from is Warband. They all time out?

Can we only work with source servers and just get lucky on some non-source servers working (like Squad)? Or is something else going on?
For example Squad works fine, which I believe is the same engine as Mordhau (EU4).

Anyone have any ideas how I can get these other game servers working?
Thanks!

  • Python-valve Version(s): 0.2.1
  • Python Version(s): 3.7.3
  • Operating System(s)/Platform(s): win10
  • Game Server(s) and Version(s): Any mordhau / warband server

Code

import valve.source.a2s
SERVER_ADDRESS = ('147.135.6.200', 7779)
with valve.source.a2s.ServerQuerier(SERVER_ADDRESS, timeout=5) as server:
    info = server.info()
    players = server.players()

print("{player_count}/{max_players} {server_name}".format(**info))
for player in sorted(players["players"],
                     key=lambda p: p["score"], reverse=True):
    print("{score} {name}".format(**player)) 

Error

Traceback (most recent call last):
  File "../test.py", line 4, in <module>
    info = server.info()
  File "..\valve\source\a2s.py", line 140, in info
    return messages.InfoResponse.decode(self.get_response())
  File "..\valve\source\a2s.py", line 33, in get_response
    data = valve.source.BaseQuerier.get_response(self)
  File "..\valve\source\__init__.py", line 78, in wrapper
    return function(self, *args, **kwargs)
  File "..\valve\source\__init__.py", line 121, in get_response
    raise NoResponseError("Timed out waiting for response")
valve.source.NoResponseError: Timed out waiting for response
@Yepoleb
Copy link
Member

Yepoleb commented May 21, 2019

If the game is supported by the Steam server browser it is supported by this library as well, but that doesn't seem to be the case for the games you mentioned.

@TirianAzter
Copy link

TirianAzter commented Dec 31, 2019

I'm able to get this to work for Mordhau. Your query port is mostly likely wrong, that looks like a game port, try 27015 (the default)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants