Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40

Thread: [RELEASE] MOH PTC - Control your server serverside!

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

    Default

    Alright i managed to use py2exec to convert the python script to a simple exe with a dll. Should be easier to use for people I will continue with development this week!

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

    Default

    Alright new release! :D Download: https://github.com/Appelpitje/MOHAA-...leases/tag/0.1
    This time include realtime kill logging, not all type of gun/kills are included since i didnt have much time + i only have the miniserver files at this moment.

    I also made an executable where people dont have to install python, also a settings configuration file is now needed.

    Settings config:

    Define on which port the MOHPTC should be listening:
    Code:
    [MOHPTC-server]
    port=8080
    Define the running MOH server
    Code:
    [MOH-server]
    game=SH
    IP=127.0.0.1
    port=12203
    rconpassword=rconpass
    game can be: AA, SH, BT. Make sure to set this correctly!

    If you want to pull the realtime kills, you will need a javascript that queries the http://MOHPTC-IP:port/kills, note that it should be faster than 1 second since the console is refreshed every second.
    It would be cool if other people could test this and let me know some feedback! :)
    Next up: finish the kill logging and add basic front end.


    Edit i forgot that i have an automatic message loop in it, will remove it in next release. Will change the messages to the settings.cfg.
    Last edited by Appelpitje; December 14th, 2017 at 01:11 PM.

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

    Default

    Quick question....
    In the settings, where you define "Define on which port the MOHPTC should be listening:"
    wouldn't it be listening on the same port that mohaa is running on? Was 8080 just an example, because 8080 is your typical HTTP port


    Also what you can do is... if it requires some libraries or python or whatever, you can package it all into a "portable\sandboxed" environment. When the app is launched it extracts the contents from within and then on exit it is removed so no changes are required on the system to run it.

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

    Default

    MOHPTC is basically a webservice, so the port 8080 is the webservice in this case.
    To monitor real time kills it would be: http://IP:8080/kills , where IP is the IP where the MOHPTC is running on (should be same IP as the moh server). This will return kills is a json array.

    It is indeed now a portable executable together with the python2.7.dll, with py2exec its possible to compile to onefile where all the libraries are cooked into the exec.
    I know im bad at explaining things

    I was also thinking about making my own frontend and let people use some sort of unique API key that they would have to put into their settings.cfg and which they then can public view on the front end. But meh, that will be for later..
    Last edited by Appelpitje; December 14th, 2017 at 01:48 PM.

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

    Default

    Nice man! Well great job and keep it up Appelpitje!

  6. #36

    Default

    OK I downloaded this but being old and slow what do I do with it does this stuff go on my server or my computer?

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

    Default

    I will try to make a video tonight, how to set it up.
    Might be for tomorrow since i got a lot of work to do.

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

    Default

    It sounds to me like it runs on your server. And to access it you would just do:
    http://<server IP>:<port specified to listen on for MOHPTC>/kills

    In other words, if the listening port is 8080 like the default config mentions above and my server is 123.123.123.123

    http://123.123.123.123:8080/kills

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

    Default

    Ok i made a video to show how to setup moh ptc and how it works:

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

    Default

    Found some time to convert the code to support Python 3 instead of Python 2: https://github.com/Appelpitje/MOHAA-...b02311b70f40f6
    Will try to work further on it, saw the other thread pass by about vote calling, could maybe also be an idea to add it in here.

Posting Permissions

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