Pages: [1]
Author Topic: using rcon in html  (Read 5518 times)
Lesser Nub

Cakes 1
Posts: 115

OpenArena 1.0.0 - /cg_roaminganimals 1 ; /cg_flipf

« on: April 05, 2008, 05:54:39 AM »

well.. instead of providing 4 lines of code which makes this possible, i didnt know it was so obvious and embarrased by the time *I* spent on it. I got my geek friend who has never played an online game to give us some insight on how he has set up his server instead. Cheesy  expect typos and stuff in any command syntax, its just an example.

If you can handle simple unix/windows admin then here's a couple of things that may or not be of any interest Cheesy I/me wrote down most of it but i got him to check it out and remove any embarrassing noob stuff Cheesy

1) Make use of standard tables and maps for your hosts.  dhcp tables can also map stuff for you. It will serve as your master list of servers or even games. It might make things easier

eg:  /etc/hosts local rcona lazergun-saw-n-rope-thing rcon-noob-a auththing auth-god

ok you can map rcon-noob-a with other stuff but this is simply specifying hosts on the system. Any gurus (which i certainly am not ) will be able use 'routing tables' n stuff ... as I am led to believe that might help you with all the house keeping  Cheesy (Luke keeps all his config names and clientinfo in hosts file using the # ignore thingy as his master reference)

if you want to get really geeky then you can also use services
example /etc/inetd.conf

shell   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rshd
login   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rlogind
exec    stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/in.rexecd
talk    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/sbin/in.ntalkd
rcon dgram   udp     wait    root    /usr/sbin/rcona  /usr/sbin/in.rconslut

if you have lots of users you can even give them an interaction interface,

qotd stream 1337/tcp (or should that be udp) nowait root /usr/sbin/tcpd \

creme-egg:/# telnet localhost 1337
Connected to localhost
Press 1 to enter quick list of admin and monitor control
Escape character is '^]'.
rcon interface connected
Type c and return for cvarlist
Enter ticket number if supplied :
# rcon mute Jack Thompson
useage : rcon <command> "<value>"
aaaaaaaaaaah fuck off... this must be a bug
Connection closed by foreign host.

So you can use ports in a different way, maybe 1= serveradmin 2= clientadmin 3= statsadmin

but none of that is important.. its just an example. If you want to do anything like this then you have all security you do/dont require.

2) Grab an rcon prog that can be used preferebly with a web server (cgi/php/whatever..)... blah they all do the same thing so you cant go wrong.

so your command might be like this...
rconprog - -port 3333 -cmd "g_chickenrocks 1"

Modify this to suit.. if your using the same ip then theres no need for these ops, just edit it to suit (ex. rcon -p 2002 -cmd).

With that you can use that as a function from the command line... or even better.. use 'aliases'..

[root@local NoGhost]# vi ~/.bashrc
alias b3='cd /usr/local/games/quake3/baseq3 ; ls ; echo "chicken rocks" # VERY IMPORTANT'

edit :

you can go crazy here if you want Smiley

$ cd myconfigs
$ more example-wild* | grep chicken | xargs rcon say "chicken nooooob"


So using above stuff should enable you to submit a form and pass the data to a one two line file..


rcon -s $server -cmd $cmd

Pipe cvarlist and collect the values which are then cached for a  php script when a server is started, rcon isnt required for this. Means you have all the defaults of the main server, and do the same for configs. If anyone wants any parsing scripts then ask me/chicken to send them. The data is portable and can be easily sent to mysql  dbs etc and all the crap is removed from the cvarlist output

 lol Well i would add that try and use config based strings and make use of the cvars. Make use of vstrs echo's and touch files.  If you look at the Cvar guide wont take long before you realise you can quickly set up cmd which you can use to trigger an event.

oki. like this?  # rcon g_listmenoobs | egrep 'chicken|url' | -exec

chicken asked me not to include it but you can | -exec and things like that which will run a command to execute a bash script for each entry using find. If things like stats and users url are set then a web admin will know that they can shut down their clansite for violations of abuse. Even on some other host if the state law permits, you can make $eg-a-user  aware that you aint in the mood for taking any shit. I have never used anything like this but do have a blacklist of serious offenders which will have an auto mail with some nice template sent to their isp and abuse departments.
Pages: [1]
Jump to: