What happened to OC? - CLOSED Carnage?!
Sign in to follow this  
Followers 0
Enclusion

Halo Server Query Python Script

Hello! I was on the reclaimers discord the other day and saw someone post information about querying halo servers. I figured this would be something that might be useful so I wrote this quick little python script that will allow you to retrieve a server's information as a dictionary. Let me know what you think, I threw this together pretty quickly.

 

https://github.com/TagiaNetwork/halo-server-query-py

 

Example Usage:

from pprint import PrettyPrinter
from haloserverquery import queryServer

printer = PrettyPrinter(indent=4)

serverInfo = queryServer("127.0.0.1", 2302)
printer.pprint(serverInfo)

Example Output:

{   'dedicated': '1',
    'final': 'Sapp',
    'fraglimit': '50',
    'game_classic': '0',
    'game_flags': '26',
    'gamemode': 'openplaying',
    'gametype': 'Slayer',
    'gamevariant': 'TeamPistols',
    'gamever': '01.00.10.0621',
    'hostname': 'server name',
    'hostport': '23900',
    'mapname': 'carousel',
    'maxplayers': '16',
    'nextmap': 'carousel',
    'nextmode': 'TeamPistols',
    'numplayers': '7',
    'password': '0',
    'player_flags': '1101561860,136',
    'players': {   0: {   'name': 'Extreme',
                          'ping': '108',
                          'score': '0',
                          'slot': 0,
                          'team': '0'},
                   1: {   'name': 'ext',
                          'ping': '90',
                          'score': '30',
                          'slot': 1,
                          'team': '1'},
                   2: {   'name': 'sL Bryan',
                          'ping': '90',
                          'score': '13',
                          'slot': 2,
                          'team': '0'},
                   3: {   'name': 'Lizmari',
                          'ping': '96',
                          'score': '8',
                          'slot': 3,
                          'team': '0'},
                   4: {   'name': 'timefreeze',
                          'ping': '110',
                          'score': '2',
                          'slot': 4,
                          'team': '0'},
                   5: {   'name': 'gjldfaghgk',
                          'ping': '85',
                          'score': '1',
                          'slot': 5,
                          'team': '1'},
                   6: {   'name': 'PAUL S2',
                          'ping': '98',
                          'score': '4',
                          'slot': 6,
                          'team': '1'}},
    'queryid': '1.1',
    'sapp': '10.2.1 CE',
    'sapp_flags': '1',
    'score_t0': '23',
    'score_t1': '37',
    'team_t0': 'Red',
    'team_t1': 'Blue',
    'teamplay': '1'}

 

AntiMomentum, Takka and mouseboyx like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.