Author Topic: SRI (php5-based rcon-interface for MWLL)  (Read 1753 times)

0 Members and 1 Guest are viewing this topic.

Offline ~SJ~ Tajin Nevversan

  • MechWarrior
  • **
  • Posts: 208
  • Karma: 9
  • SteamID: Tajin
SRI (php5-based rcon-interface for MWLL)
« on: August 08, 2010, 09:35:38 PM »
Since allot of people lately asked me about the "rcon-thing" we at SJ are using for our server. I've decided to take our little rcon-interface (which was originally built into an php-fusion based environment that we have), make some adjustments to it and finally release it to the public.

I present you the SRI (smokejaguar rcon interface) v0.4


It is still an rather early version, but it already is quite flexile and may get a couple of new features in the future. Talking about features, let me tell you a bit more about them.

SRI can do the following:
- Display the status of your server (including connected players/teams)
- Quick mapchange by simply selecting the map you want from a dropdown menu
- update the list of available maps for the interface with a single mouseclick
- access to an (editable) list of server-settings
- access to an (editable) list of server-commands
- direct rcon-input and feedback from the server
- basic user-login combined with the ability  to set detailed permissions for each user
(for example you could give your clan-members an account that is only able to change maps)
- easy patching
- no page-reload (using Ajax)



Note that this script only works with an up-to-date version of curl running on your webserver. Your provider might help you there if this turns out to be a problem.

Installation

- Download the package: http://rcon.rising.at/SRI_0.4.zip
- The zip contains two files. One of which is the config.php.
- Open the config.php, it contains some important settings that need to be changed first, along with some comments on how to use it.
- When done, upload both files (config.php & patch.php) on your webserver (I recommend using a seperate directory for it)
- Once done, enter the path to the patch.php into your browser, followed by "?key=" and the patchkey you set in your config file. Example: "http://www.yoururl.com/patch.php?key=patchkey"
- The script will now download the latest version and install it in the directory it is put in.
You can use the same url later on to update the script if I release a new version.
- If everything went well, you can now access the index.php of the script and start using it.


Useraccounts and their permissions are also set in the config.php



The tool originally used mysql to store its data, for now however I've decided to use simple textfiles in order to make things a bit easier to handle for the average user.

I hope this turns out to be useful for the serveradmins out there and makes serveradministration in MWLL a bit more accessible and easier to handle. That's it for now, give it a try if you want, I'll ofcourse try to answer any questions that may arise to the best of my abilities.

~SJ~ Tajin
« Last Edit: August 20, 2010, 06:17:35 PM by ~SJ~ Tajin »

~ SJ Droplist generator is updated and back online. ~

Offline ~SJ~ Blhurr

  • Star Colonel
  • ****
  • Posts: 1900
  • Karma: 48
  • ~SJ~
Re: SRI (php-based rcon-interface for MWLL)
« Reply #1 on: August 08, 2010, 10:02:19 PM »
Haven't used it myself but it really makes map changing a breeze for the Legends Arena
Mechwarrior Blhurr - Smoke Jags - Delta Star - The 331st Feral Fangs

"Damn these RCTs! 'Mech combat is bad enough, let alone the  combine d arms of 'Mechs, vehicles, infantry, and fighters."

Offline Seraph

  • Lead Developer
  • Living Legend
  • *
  • Posts: 4078
  • Karma: 101
    • The Living Legends Mercenary Unit
Re: SRI (php-based rcon-interface for MWLL)
« Reply #2 on: August 10, 2010, 03:40:10 PM »
Excellent work Tajin! Looks clean and functional, job well done.

I highly recommend this tool. It makes administrating servers very easy and allows web access to the tool. Thumbs up!
Seraph - "The Can Man"
In the heat of battle, legends are born ...



Offline CHHš Rampage

  • Lance Captain
  • ***
  • Posts: 677
  • Karma: 23
  • CHH Recruitment Officer - Commander Theta Galaxy
    • Rampage Computers
Re: SRI (php-based rcon-interface for MWLL)
« Reply #3 on: August 19, 2010, 06:40:14 PM »
Thanks very much ~SJ~Tajin. Sorry you and I have not been able to hook up. I will give this a try on my own and see if I can get it working. If I have problems then I will be pestering you again. Thanks for your contributions to the community. Both this and the Drop Deck Calculator are awesome tools that really help during ladder/league play.
,

Offline 7.[WD]Poldi

  • Lance Sergeant
  • **
  • Posts: 411
  • Karma: 27
  • Col. 7th Reg. Wolfs Dragoons
    • 7th Wolf Dragoons HQ
Re: SRI (php-based rcon-interface for MWLL)
« Reply #4 on: August 20, 2010, 12:16:48 PM »
set it all up and when accessing the index.php i get this:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in <path>/functions.php on line 108

edit: had to activate php5 through .htaccess but I cant delete or change files within the gameq folder because the script is it's owner - which is a big fault! I need to be able to have full power over all my files on my server.

edit2: the "click to get MWLL data" does only work in IE, not in FireFox. Also the Update Maplist does not give any result for me in both browsers.

edit3: when trying to change maps I get this:
An error occurred:
Code: 8
Reason: CURL
error: Operation timed out with 24 out of -1 bytes received
« Last Edit: August 20, 2010, 01:39:48 PM by 7.[WD]Poldi »



Online Ingrater

  • MWLL Lead Coder
  • Project Director
  • Star Captain
  • *
  • Posts: 1106
  • Karma: 90
Re: SRI (php-based rcon-interface for MWLL)
« Reply #5 on: August 20, 2010, 12:30:51 PM »
Tajin you should add that your scripts only will work with php 5

It does not work with Firefox for me, it only works if I use the Internet Explorer. Firefox gives the following error:
Code: [Select]
Fehler: document.getElementById("tl") is null
Quelldatei: http://www.7thwolfdragoons.eu/SRI/MW1/index.php
Zeile: 122

If I click on the first entry to get the server data nothing happens in firefox.
« Last Edit: August 20, 2010, 12:50:43 PM by Ingrater »
There comes a point where the talking must stop, and people have to do actual work.

Offline ~SJ~ Tajin Nevversan

  • MechWarrior
  • **
  • Posts: 208
  • Karma: 9
  • SteamID: Tajin
Re: SRI (php-based rcon-interface for MWLL)
« Reply #6 on: August 20, 2010, 02:34:22 PM »
Thank you for the feedback guys. Yes maybe I should've mentioned it beeing PHP5. I'll edit the post.

The problem with firefox should be fixed now, there was an problem with the ajax-request.
(just run the patch.php to get the updated files.)


Code: [Select]
An error occurred:
Code: 8
Reason: CURL
error: Operation timed out with 24 out of -1 bytes received
Either the CURL version on your server is too old or that the port is blocked. Either way, if curl isn't available, neither the maplist-update nor any of the servercommands will work. I don't see a way around this, other than updating your server.

~ SJ Droplist generator is updated and back online. ~

Offline ~SJ~KorbinWimmer

  • Lance Captain
  • ***
  • Posts: 592
  • Karma: 22
Re: SRI (php-based rcon-interface for MWLL)
« Reply #7 on: August 20, 2010, 03:15:24 PM »
Side note: Works with Google Chrome.

Online MerfMerf

  • Apprentice Dev
  • Star Colonel
  • *
  • Posts: 1528
  • Karma: 71
  • Clan Smoke Jaguar, 331st Feral Fangs
Re: SRI (php5-based rcon-interface for MWLL)
« Reply #8 on: August 20, 2010, 03:57:30 PM »
Side note: Works with Opera

/Merf - Think its the only viable choice for surfing without using the mouse

Offline 7.[WD]Poldi

  • Lance Sergeant
  • **
  • Posts: 411
  • Karma: 27
  • Col. 7th Reg. Wolfs Dragoons
    • 7th Wolf Dragoons HQ
Re: SRI (php-based rcon-interface for MWLL)
« Reply #9 on: August 20, 2010, 04:07:57 PM »
...
 or that the port is blocked.
...

would that be just the rcon port used or another one?

edit: CURL seems to be ok:
Code: [Select]
CURL support enabled
CURL Information libcurl/7.15.3 OpenSSL/0.9.8a zlib/1.2.3 libidn/1.10



Offline ~SJ~ Tajin Nevversan

  • MechWarrior
  • **
  • Posts: 208
  • Karma: 9
  • SteamID: Tajin
Re: SRI (php5-based rcon-interface for MWLL)
« Reply #10 on: August 20, 2010, 05:01:38 PM »
normally just the rcon-httpport
Is your server-config set up correctly?

You should have sth like this in your server.cfg:
Code: [Select]
http_password yourpassword
http_startserver port:09012
9012 is the port i found to work for our server, you might want to try a different one though.

You could try connecting with CryRcon to see if your http-rcon on the gameserver works.

~ SJ Droplist generator is updated and back online. ~

Offline ~SJ~ Tajin Nevversan

  • MechWarrior
  • **
  • Posts: 208
  • Karma: 9
  • SteamID: Tajin
Re: SRI (php5-based rcon-interface for MWLL)
« Reply #11 on: August 20, 2010, 06:01:55 PM »
*updated*
Users with rcon-access now get notified about updated files in the interface. Patching can be done from there, but ofcourse they still have to know the patchkey.

~ SJ Droplist generator is updated and back online. ~

Offline 7.[WD]Poldi

  • Lance Sergeant
  • **
  • Posts: 411
  • Karma: 27
  • Col. 7th Reg. Wolfs Dragoons
    • 7th Wolf Dragoons HQ
Re: SRI (php5-based rcon-interface for MWLL)
« Reply #12 on: August 20, 2010, 07:49:08 PM »
ok got it working now. had the rcon port - you should put that into the instructions to use the http-port.
Great job Tajin and thx for help!

what I miss is the Pings of each player being shown. Can that be added?



Offline ~SJ~ Tajin Nevversan

  • MechWarrior
  • **
  • Posts: 208
  • Karma: 9
  • SteamID: Tajin
Re: SRI (php5-based rcon-interface for MWLL)
« Reply #13 on: August 20, 2010, 09:14:20 PM »
Quote
// the httppassword is set in the config.cfg file on your gameserver by the following command:
// http_password yourpasswordhere

I thought that would suffice ;)


Anyways, I'm glad to hear it's working for you now.
Yup I can add some more info to the playerlist, pings are no problem.

~ SJ Droplist generator is updated and back online. ~

Online Ingrater

  • MWLL Lead Coder
  • Project Director
  • Star Captain
  • *
  • Posts: 1106
  • Karma: 90
Re: SRI (php5-based rcon-interface for MWLL)
« Reply #14 on: August 20, 2010, 10:27:15 PM »
We discovered a small problem, after some time your tool stoped to work. Did you ever encounter something like that? The server didn't react on the commands any more.
But I think thats the usual crysis-rcon crashing.
There comes a point where the talking must stop, and people have to do actual work.