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!
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:
Define the running MOH serverCode:[MOHPTC-server] port=8080
game can be: AA, SH, BT. Make sure to set this correctly!Code:[MOH-server] game=SH IP=127.0.0.1 port=12203 rconpassword=rconpass
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.
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.
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..
Nice man! Well great job and keep it up Appelpitje!
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?
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
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.