Results 1 to 3 of 3

Thread: MOHAA RCON API

  1. #1
    Client Beta Testers Appelpitje's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    571

    Post MOHAA RCON API

    I have made a simple MOHAA rcon API!

    How it works: Send server data to the API, the API will query it for you on the MOH server and send the response back to you.
    This should be helpfull for web devs, since it easy easy to make rcon calls to your gameserver via this API.

    API: https://mohaa-api.herokuapp.com/rcon
    (Only supports POST requests)

    Example:
    URL: Request Header:
    Code:
    Content-Type: application/json
    Request Payload(only JSON):
    Code:
    {"ip" : "127.0.0.1", "port" : 12203, "password" : "myubersecretrconpassword", "command" : "serverinfo"}
    Response:
    Code:
    ["����\u0001print", "Server info settings:", "sv_cheats            : 0", "deathmatch           : 1", "version              : Medal of Honor Spearhead 2.15 win-x86 Mar  4 2003", "skill                : 1", "dmflags              : 1835008", "fraglimit            : 7", "timelimit            : 0", "protocol             : 17", "mapname              : obj/obj_team1", "sv_privateClients    : 0", "sv_hostname          : G|u|N - All Weapons stock Objective | https://gun-clan.com", "sv_maxclients        : 20", "sv_maxRate           : 0", "sv_minPing           : 0", "sv_maxPing           : 0", "sv_floodProtect      : 1", "sv_maplist           : obj/obj_team2 obj_MP_Druckkammern_TOW obj/obj_team4 obj/obj_team1", "g_gametype           : 4", "g_gametypestring     : Objective-Match", "sv_fps               : 20", "sv_mapChecksum       : -1549376668", "admin                : Appelpitje", "g_realismmode        : 1", "sv_team_spawn_interval : 15", "g_allowvote          : 0", "sv_invulnerabletime  : 3", "g_allowjointime      : 900", "roundlimit           : 0", "g_forceready         : 1", "g_forcerespawn       : 0", "g_maxintermission    : 15", "g_obj_alliedtext1    : - Find and destroy", "g_obj_alliedtext2    : the Flak 88 cannon", "g_obj_axistext1      : - Defend the Flak 88", "g_obj_axistext2      : cannon", "g_obj_axistext3      :  ", "g_scoreboardpic      : objdm1"]


    If you don't want to use or don't trust my API you can use the code here: https://github.com/Appelpitje/MOHAA-...r/MOHAA_API.py
    Last edited by Appelpitje; November 4th, 2018 at 04:15 AM.

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Nice job man! Good share!

  3. #3
    Client Beta Testers Appelpitje's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    571

    Default

    Thanks! The code is currently hosted on a free Heroku dynamo so whenever there is inactivity on the app it 'll take few seconds to load, after that it should be fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •