Skip to content

Instantly share code, notes, and snippets.

@Cightline
Last active December 21, 2017 16:02
Show Gist options
  • Save Cightline/12c6def0bddce9bb3a88335895f809c1 to your computer and use it in GitHub Desktop.
Save Cightline/12c6def0bddce9bb3a88335895f809c1 to your computer and use it in GitHub Desktop.
Arma III python-valve test
import valve.source
import valve.source.a2s
import valve.source.master_server
with valve.source.master_server.MasterServerQuerier() as msq:
try:
print('Looking up servers...')
for address in msq.find(gamedir=u"arma3"):
with valve.source.a2s.ServerQuerier(address) as server:
info = server.info()
players = server.players()
print(info['server_name'])
except Exception as e:
print('Exception: %s' % (e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment