Digital Paint Discussion Board
Paintball 2: The Game => Paintball 2 Discussion => Topic started by: sk89q on July 11, 2007, 04:45:47 PM
-
(http://img337.imageshack.us/img337/2523/pbserverconsoleke3.png)
I am very gradually working on this. It's web-based and so it requires a web server to run on, but it means that you can access it from anywhere. This is version two, since I've been using an older thing I made a while ago to manage my server (from the web).
The color coded log only appears if it's running on the same server and the log file can be accessed, though alternative ways ("drivers") can be made to get the log some other way. Passwords are censored (to the best ability of my script) as they show too.
If anyone has any ideas or comments, feel free to say anything. I'm also curious if anyone would find it even useful, since there's ASE's RCON client (and others) already.
-
This looks great. A web-based remote rcon client would be incredibly useful for server admins.
-
ASE is not very handy, so yours seems to be nice. I'm using "Rcon Unlimited" for 2 years now, and would only switch to yours if you could include stuff like timebased/event based execution of commands, but I bet for many server admins, your tool could come in handy. nice job there.
-
ASE is not very handy, so yours seems to be nice. I'm using "Rcon Unlimited" for 2 years now, and would only switch to yours if you could include stuff like timebased/event based execution of commands, but I bet for many server admins, your tool could come in handy. nice job there.
Same :)
-
Well, time-based/event/delayed command execution seems to be something more fit for an actual program, but in the mean time, what are some uses you have in mind for a time-based/event/delayed command execution function?
I might make an actual RCON program for Paintball actually, since a web-based client does have its limitations.
-
Looks cool. If you decide to make a standalone program, you might consider building it into the standalone server browser. A few people have requested that. Though it may be simpler/cleaner to have a separate program that can be launched from the server browser, I don't know. Source should be attached near the end of the thread: http://dplogin.com/forums/index.php?topic=1683.0
-
time-based: advertisement?
event-based: for example, execute a config when the last person quits the server
-
It's been too long since I've worked with C++. If I had more time, maybe I'd work on it (I would prefer it written in C++ over .NET and, diety forbid, Java).
As for the time-based/event-based stuff, I recall myself trying that once, but I wrote it PHP since it was really quick to make. I probably couldn't find it anymore if I tried but I sure could redo it. Would you mind if it were in PHP?
And for the RCON client, the menus are semi-customizable and custom commands are implemented (!yourcommandhere). Just a little more work and it should be in releasable beta.
By the way, is it possible to do forcejoin (or whatever it's called) via RCON? I failed to get it to work, and with the sv prefix too. I was trying to make a "shuffle teams" feature.
And is cprint possible via RCON (I assume not, from what I remember looking at the game's source)?
-
there's no cprint via RCON, dunno about the forcejoin part. jitspoe is gone for another week or so.
-
I don't think either are available through rcon.
-
Looks very nice. Everyone has a web browser, whereas not every has ASE, so this could be used by all server admins. Good job.
-
That looks amazing. I was wondering if you, or possibly anyone else here could direct me to a list of all the rcon commands?
-
Here's a copy of my program: PBServerConsole 1.0
http://digitalpaint.therisenrealm.com/downloads/pbsc/pbsc_1_0.zip
I've been busy lately and haven't had too much time on this, though the only thing left really is the documentation. Read README.txt for installation information.
For RCON commands, I don't think there's a list anywhere. A lot of regular commands work though, and some will work if you prefix it with sv. I have a reference of commands and variables here:
http://digitalpaint.therisenrealm.com/reference/commands
-
rcon just stands for remote console, so any server console command will work. The client/game commands, however won't (things like join, dropgun, etc., as well as some of the login admin commands). Some of the commands work with the sv prefix, though, as sk89q said.
-
An error has occurred:
Specified profile does not exist.
I must change something with "global registers = off" ?
-
I've been away/unavailable, but anyway... time to resurrect a thread.
It should work whether register_globals is on or off. I just tested it on both configurations.
What did you put in your servers.php file, without the passwords and sensitive information of course?
-
I tested it with and without any password and with the examples. The message is always the same.
-
Looks like your zip file is now corrupt.
-
Looks like your zip file is now corrupt.
http://digitalpaint.therisenrealm.com/downloads/pbsc/pbsc_1_0.zip ?
-
hmmm
n/m it works now.
-
Well done, this script is very nice, thank you sk89q.
Probably someone know my project: leezerz.com. We want to build a huge DP-Community, there you can upload videos, can join groups and clans, chat via IRC or just connect to our teamspeakserver. But there is a 2nd big part of leezerz.com: We have got many DP-Servers and you rent them. To enable this, I have to edit your script, so that the players just can rent them, if nobody is on the server. My PHP-Skills are not very good, so I tried follow code, but it doenst work:
<?php
$test = ("pbConsole.send('listuserid')");
if strlen($test)== 0
{
$DMENU = array(
'Console' => array(
array('Toggle log display', "pbConsole.showLog=!pbConsole.showLog;pbConsole.readjustWindow()"),
array('----', ""),
array('Close console', "window.close()"),
),
'Server' => array(
array('Game version', "pbConsole.send('version')"),
array('Server information', "pbConsole.send('serverinfo')"),
array('Send a heartbeat', "pbConsole.send('heartbeat')"),
array('Execute a config/script file...', "pbConsole.askSend('exec ', '', ['Script filename?'])"),
array('Set server list master servers...', "pbConsole.askSend('setmaster ', '', ['Space separated list of server hosts?'])"),
array('----', ""),
array('Get a variable...', "pbConsole.askSend('get ', '', ['Name of variable?'])"),
array('Set a variable...', "pbConsole.askSend('set ', '', ['Name of variable?', 'Value?'])"),
array('Clear a variable...', "pbConsole.askSend('sv cvar_clear ', '', ['Name of variable?'])"),
array('Reset server variables...', "pbConsole.send('!resetvars')"),
array('----', ""),
array('List maps in rotation', "pbConsole.send('sv maplist')"),
array('Add map to rotation...', "pbConsole.askSend('sv rotation add ', '', ['Map name?'])"),
array('Remove map from rotation...', "pbConsole.askSend('sv rotation remove ', '', ['Map name?'])"),
),
'Game' => array(
array('Change to a new map...', "pbConsole.askSend('sv newmap ', '', ['Map name?'])"),
array('Select random map from rotation', "pbConsole.send('!randommap')"),
array('----', ""),
array('Expert mode...', "pbConsole.send('sv expert');pbConsole.askSend('sv expert ', '', ['ID # for gun?'])"),
array('----', ""),
array('Shuffle teams randomly', "pbConsole.send('!shuffleteams')"),
array('Shuffle teams by kills', "pbConsole.send('!shuffleteams kills')"),
array('Shuffle teams by flag captures', "pbConsole.send('!shuffleteams caps')"),
array('----', ""),
array('Record a demo...', "pbConsole.askSend('serverrecord ', '', ['Name of demo?'])"),
array('End recording of demo', "pbConsole.send('serverstop')"),
),
'Users' => array(
array('Players information', "pbConsole.send('status')"),
array('List player IP information', "pbConsole.send('sv listuserip')"),
array('----', ""),
array('Dump player information...', "pbConsole.askSend('dumpuser ', '', ['User ID #?'])"),
array('Kick a player...', "pbConsole.askSend('kick ', '', ['User ID #?'])"),
array('----', ""),
array('Kick all players?', "pbConsole.confirmSend('!kickallplayers', 'Kick all players?')"),
array('Kick all players and bots?', "pbConsole.confirmSend('!kickallplayersbots', 'Kick all players and bots?')"),
array('----', ""),
array('Add an ACEBot', "pbConsole.send('sv addbot')"),
array('Add a custom named ACEBot...', "pbConsole.askSend('sv addbot ', '', ['Name of bot?'])"),
array('Remove a bot...', "pbConsole.askSend('sv removebot ', '', ['Name of bot?'])"),
array('Remove all bots', "pbConsole.send('sv removebot all')"),
array('Bot command...', "pbConsole.askSend('sv botcommand ', '', ['Command to execute?'])"),
array('Save nodes', "pbConsole.send('sv savenodes')"),
),
'Administration' => array(
array('Talk into game from console...', "pbConsole.askSend('say ', '', ['Message?'])"),
array('----', ""),
array('List banned IP addresses', "pbConsole.send('sv listip')"),
array('Add IP to ban list', "pbConsole.askSend('sv addip ', '', ['IP address/mask?'])"),
array('Save ban list to disk', "pbConsole.send('sv writeip')"),
array('----', ""),
array('Remove all temporary bans?', "pbConsole.confirmSend('sv removetbans', 'Remove temporary bans?')"),
array('----', ""),
array('Kill server?', "pbConsole.confirmSend('quit', 'Are you sure you wish to KILL THE SERVER?')"),
),
'Password and Login' => array(
array('----', ""),
array('Set the password', "pbConsole.askSend('password ', '', ['Password?'])"),
array('Set the login', "pbConsole.askSend('oppass1 ', '', ['Login?'])"),
array('----', ""),
);
}
else
{
$DMENU = array(
'Sorry, Server already in use!' => array( 'Nothing to use'
),
);
}
?>
Somewhere in this code are bugs, but i cant find them. Can someone help me?
-
waddup partner
-
<?php
$test = ("pbConsole.send('listuserid')");
if( strlen($test)== 0)
{
$DMENU = array(
'Console' => array(
array('Toggle log display', "pbConsole.showLog=!pbConsole.showLog;pbConsole.readjustWindow()"),
array('----', ""),
array('Close console', "window.close()"),
),
'Server' => array(
array('Game version', "pbConsole.send('version')"),
array('Server information', "pbConsole.send('serverinfo')"),
array('Send a heartbeat', "pbConsole.send('heartbeat')"),
array('Execute a config/script file...', "pbConsole.askSend('exec ', '', ['Script filename?'])"),
array('Set server list master servers...', "pbConsole.askSend('setmaster ', '', ['Space separated list of server hosts?'])"),
array('----', ""),
array('Get a variable...', "pbConsole.askSend('get ', '', ['Name of variable?'])"),
array('Set a variable...', "pbConsole.askSend('set ', '', ['Name of variable?', 'Value?'])"),
array('Clear a variable...', "pbConsole.askSend('sv cvar_clear ', '', ['Name of variable?'])"),
array('Reset server variables...', "pbConsole.send('!resetvars')"),
array('----', ""),
array('List maps in rotation', "pbConsole.send('sv maplist')"),
array('Add map to rotation...', "pbConsole.askSend('sv rotation add ', '', ['Map name?'])"),
array('Remove map from rotation...', "pbConsole.askSend('sv rotation remove ', '', ['Map name?'])"),
),
'Game' => array(
array('Change to a new map...', "pbConsole.askSend('sv newmap ', '', ['Map name?'])"),
array('Select random map from rotation', "pbConsole.send('!randommap')"),
array('----', ""),
array('Expert mode...', "pbConsole.send('sv expert');pbConsole.askSend('sv expert ', '', ['ID # for gun?'])"),
array('----', ""),
array('Shuffle teams randomly', "pbConsole.send('!shuffleteams')"),
array('Shuffle teams by kills', "pbConsole.send('!shuffleteams kills')"),
array('Shuffle teams by flag captures', "pbConsole.send('!shuffleteams caps')"),
array('----', ""),
array('Record a demo...', "pbConsole.askSend('serverrecord ', '', ['Name of demo?'])"),
array('End recording of demo', "pbConsole.send('serverstop')"),
),
'Users' => array(
array('Players information', "pbConsole.send('status')"),
array('List player IP information', "pbConsole.send('sv listuserip')"),
array('----', ""),
array('Dump player information...', "pbConsole.askSend('dumpuser ', '', ['User ID #?'])"),
array('Kick a player...', "pbConsole.askSend('kick ', '', ['User ID #?'])"),
array('----', ""),
array('Kick all players?', "pbConsole.confirmSend('!kickallplayers', 'Kick all players?')"),
array('Kick all players and bots?', "pbConsole.confirmSend('!kickallplayersbots', 'Kick all players and bots?')"),
array('----', ""),
array('Add an ACEBot', "pbConsole.send('sv addbot')"),
array('Add a custom named ACEBot...', "pbConsole.askSend('sv addbot ', '', ['Name of bot?'])"),
array('Remove a bot...', "pbConsole.askSend('sv removebot ', '', ['Name of bot?'])"),
array('Remove all bots', "pbConsole.send('sv removebot all')"),
array('Bot command...', "pbConsole.askSend('sv botcommand ', '', ['Command to execute?'])"),
array('Save nodes', "pbConsole.send('sv savenodes')"),
),
'Administration' => array(
array('Talk into game from console...', "pbConsole.askSend('say ', '', ['Message?'])"),
array('----', ""),
array('List banned IP addresses', "pbConsole.send('sv listip')"),
array('Add IP to ban list', "pbConsole.askSend('sv addip ', '', ['IP address/mask?'])"),
array('Save ban list to disk', "pbConsole.send('sv writeip')"),
array('----', ""),
array('Remove all temporary bans?', "pbConsole.confirmSend('sv removetbans', 'Remove temporary bans?')"),
array('----', ""),
array('Kill server?', "pbConsole.confirmSend('quit', 'Are you sure you wish to KILL THE SERVER?')"),
),
'Password and Login' => array(
array('----', ""),
array('Set the password', "pbConsole.askSend('password ', '', ['Password?'])"),
array('Set the login', "pbConsole.askSend('oppass1 ', '', ['Login?'])"),
array('----', ""),
),
);
}
else
{
$DMENU = array(
'Sorry, Server already in use!' => array( 'Nothing to use'
),
);
}
?>
-
Thank you
EDIT: Uh, I got again an error:
$test = ("pbConsole.send('listuserip')");
if( strlen($test)== 0)
$test is the same value all the time and it doesn´t matter, whether a player is on the server or not.
-
Err, what error?
$test would be the same value all the time because... you set it to a string.
"pbConsole.send('listuserip')" is JavaScript code, and it's not related to PHP at all. I think you might have to learn some more PHP before attempting this further...
-
Another option may be to get on IRC and have Xbain help you out to setup a !match command if he is willing to.
-
does that mean, there isnt any way to set $test to the value of listuserip?
-
Another option may be to get on IRC and have Xbain help you out to setup a !match command if he is willing to.
My !match script is currently hosted on a server which may disappear this coming month. I've been looking for an alternative host to place it, but I've been having trouble finding anyone with a dedicated server that allows IRC.
I would much rather get away from the Eggdrop and its TCL horridness. I've been looking at autumn-leaves (http://code.google.com/p/autumn-leaves/) since it is a nice little IRC framework written in Ruby. TCL has become so tedious that I'm usually doing anything that's almost difficult with PHP and reading the output to the bot.
I've always preferred having people reserve the servers through IRC since it's easier to control access and detect abuse. However with the ideas I've had (and MeMi has impemented) around a web-based script, I may decide to go with that.
Back on topic, using this web-based rcon script is a waste of time. It does way more than what you need, and you're trying to use it for something other than what it was intended for. You're better off hacking this (http://misc.slowchop.com/misc/wiki/q3query) code to meet your needs, even though it's for Q3, it's all the same.
-
Another option may be to get on IRC and have Xbain help you out to setup a !match command if he is willing to.
They want to get more people to visit their website ;)
-
You're better off hacking this (http://misc.slowchop.com/misc/wiki/q3query) code to meet your needs, even though it's for Q3, it's all the same.
Or better, this: libdpserver (http://digitalpaint.therisenrealm.com/tools/sdk/libdpserver)
-
My !match script is currently hosted on a server which may disappear this coming month. I've been looking for an alternative host to place it, but I've been having trouble finding anyone with a dedicated server that allows IRC.
What requirements need IRC or your script? Probably we can help you.
-
Or better, this: libdpserver (http://digitalpaint.therisenrealm.com/tools/sdk/libdpserver)
Thats looking just like a "serverviewer", but you can´t set the password or the login, can you?
EDIT: Sorry for the 2nd post, but I missed the right button...
-
Thats looking just like a "serverviewer", but you can´t set the password or the login, can you?
No... it's a library... a class... a software development kit... whatever you want to call it.
-
Leezerz: If you are in need of a RCON client get something like RCON Unlimited.
I think logins can only be set in the server.cfg buy I may be wrong.
-
I need a web-based rcon-client.
An example: http://www.memi-clan.de/index.php?page=rent&lang=de (http://www.memi-clan.de/index.php?page=rent&lang=de)
-
o_0 I wouldn't call that an RCON client exactly.
You may want to try to get in touch with Snipen from GT or Terrorist from OTB because they both run things similar to that.
-
Our system has a bug. We search for a good matchserver tool too.
-
I am so not seeing the difficulty with making a match server tool. o.o With my class... it'd take < 20 minutes. Building an IRC bot in PHP... also takes < 20 minutes. o.o
I might be able to make one if I get some time today. What features do you need? What exactly (i.e. the commands) needs to be done? I'm not going to do the IRC bot though.
-
changing password and login, what is all
( password, oppass1...)
-
I am so not seeing the difficulty with making a match server tool. o.o With my class... it'd take < 20 minutes. Building an IRC bot in PHP... also takes < 20 minutes. o.o
I might be able to make one if I get some time today. What features do you need? What exactly (i.e. the commands) needs to be done? I'm not going to do the IRC bot though.
You're selling out to the script kiddies ;)
-
I'm not doing it for anyone in particular. :P
I'll release it on DP Resource.
-
changing password and login, what is all
( password, oppass1...)
Yes, if u can include "exec publicmode.cfg" it would be great.
-
By the way, when does the lease on the match server 'expire'? How does it expire? A process checking the server occasionally? A cvar?
-
The following is using the match <password> <login> command.
When the match command is executed, the server will set the default (strict) match settings (like typing the "matchmode" command). There's also a "match_timeout" setting (defaults to 1 minute if unset) that, like "passwordtimeout", resets the password (as well as match settings -- executes the "publicmode" command) after a given period of time (in minutes) if nobody else connects.
Hopefully that helps.
-
I don't think that's what he meant KiLo.
sk89q, can't you just check to see if the server is in use on a lease request, and if not issue a new password/login? (not including like 5 minutes of free time after requesting it)
-
Well, what is defined as 'in use'? Someone is in the server?
-
I would guess so.
-
Let's see what these people have to say. :O
-
:P
-
Well, what is defined as 'in use'? Someone is in the server?
Yes, a server is in use, when someone is in the server. If nobody is on the server, the user can rent it. If not, it should display a message like "Server is in use, sorry!" or something like this.