Author Topic: DP Match Server Tool -- for clans with servers that can be reserved  (Read 15359 times)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
If you have a few match servers that you want to let others use, you can install this application on your web server so that they can use them without needing to know your password. This is like what various clans on PB have (such as GT, OTB, QeHS).

Features:
- Auto-select available server option
- Grace period
- Completely skinnable/themable
- Allow users to change some cvars (restricted)
- Allow users to change some cvars after they've leased the server
- If they try to change cvars after they've leased the server, warnings will be issued to the game (so cheating with it is out of the question)
- Displays server status
- Spam-bot check

http://code.google.com/p/dpmatchreserve/

PHP 5 required. register_globals and magic_quotes_gpc need to be off; they can be turned off via .htaccess. Localization is not supported currently.

==

Example configuration file:

Code: [Select]
<-?php
# Configuration file for DPMatchReserve
$CONFIG = array();

##################################
# Settings
##################################

# The base URL to the directory that contains this
# application. Leave it blank for autodetection
$CONFIG['base_url'] = '';

# The default map that the server will be changed to when
# a server is requested
$CONFIG['default_map'] = 'pbcup';

# Name of theme to use
$CONFIG['theme'] = 'simple';

# Set to 1 if to enable the debugging console for Smarty that
# displays the variables available for the template
$CONFIG['theme_debug_console'] = '0';

# Set to 1 if developing a theme, and to 0 to turn it off.
# Turning on debug mode will force templates to be recompiled
# as necessary, otherwise your templates will be cached and your
# changes will not change anything!
$CONFIG['theme_debug'] = '0';

# Number of seconds to allow a grace period so that they can join
# the server before anyone else can try again. Specified in
# seconds
$CONFIG['grace_period'] = '30';

# Shows an option for the user to select the application to
# automatically select a open server for them
$CONFIG['enable_autoselect'] = '1';

# Requires that the server have at least one player on it
# before someone is allowed to change the game variables *after*
# the server has been leased to them
$CONFIG['custom_var_require_nonempty'] = '1';

# Requires that the person trying to change the game variables
# *after* the server has been leased to them to be on the
# server (checks by IP)
$CONFIG['custom_var_require_ip_on'] = '0';

# This prevents automated spam bots that scour the Internet
# from submitting this form
$CONFIG['bot_check_string'] = 'paintball';

##################################
# Server configurations
##################################

# Configure all the match servers below that you want others
# to be able to lease. Just copy the section and paste it over,
# remembering to modify the information for each one

$CONFIG['servers'][] = array(
'name' => 'Match Server #1',
'host' => '127.0.0.1',
'port' => '27910',
'rcon_password' => 'hackme',
'op_pass_num' => '1',
);

$CONFIG['servers'][] = array(
'name' => 'Match Server #2',
'host' => '127.0.0.1',
'port' => '27911',
'rcon_password' => 'hackme',
'op_pass_num' => '1',
);

##################################
# Default settings
##################################

# These settings will be applied when someone uses the match
# tool to lease a server. This is useful if you allow people
# to change the game settings because it will reset the
# settings for the next group.

$CONFIG['default_settings']['elim'] = '60';
$CONFIG['default_settings']['ffire'] = '1';
$CONFIG['default_settings']['flagcapendsround'] = '1';
$CONFIG['default_settings']['flagmustbeatbase'] = '0';
$CONFIG['default_settings']['gren_explodeonimpact'] = '0';
$CONFIG['default_settings']['guntemp_dec'] = '4';
$CONFIG['default_settings']['guntemp_inc'] = '11';
$CONFIG['default_settings']['PaintGrens'] = '2';
$CONFIG['default_settings']['pong_nokill'] = '1';
$CONFIG['default_settings']['SmokeGrens'] = '1';

##################################
# User-modifiable settings
##################################

# Users will be able to modify these settings when trying to
# lease the match server and after the match server has been
# leased to them. Just copy each block and modify it as needed.
#
# type = {bool|int|float}
# min = <number>
# max = <number>
# only_after_lease = {1|0}
#
# Notes:
# - only_after_lease: Prevents users from changing this setting
#   until after they have leased the server

$CONFIG['user_settings']['elim'] = array(
'type' => 'int',
'min' => '0',
'max' => '120',
);

$CONFIG['user_settings']['ffire'] = array(
'type' => 'bool',
);

$CONFIG['user_settings']['flagcapendsround'] = array(
'type' => 'bool',
);

$CONFIG['user_settings']['flagmustbeatbase'] = array(
'type' => 'bool',
);

$CONFIG['user_settings']['gren_explodeonimpact'] = array(
'type' => 'bool',
);

$CONFIG['user_settings']['guntemp_dec'] = array(
'type' => 'int',
'min' => '1',
'max' => '5',
);

$CONFIG['user_settings']['guntemp_inc'] = array(
'type' => 'int',
'min' => '0',
'max' => '11',
);

$CONFIG['user_settings']['PaintGrens'] = array(
'type' => 'int',
'min' => '0',
'max' => '5',
);

$CONFIG['user_settings']['pong_nokill'] = array(
'type' => 'bool',
);

$CONFIG['user_settings']['SmokeGrens'] = array(
'type' => 'int',
'min' => '0',
'max' => '5',
);

$CONFIG['user_settings']['sv_gravity'] = array(
'type' => 'int',
'min' => '0',
'max' => '800',
'only_after_lease' => '1',
);
?>
« Last Edit: September 25, 2008, 11:39:48 PM by sk89q »

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #1 on: April 01, 2008, 06:16:50 PM »
Ooooh.  Looks nice.  One question though, do the boolean settings (ffire, flagcapendsround, etc) need the empty option?  Shouldn't that just be left out so you can only choose "True" or "False"?

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #2 on: April 01, 2008, 06:29:56 PM »
Well, it just won't change the setting if you choose the blank. Likewise if you clear one of the text input boxes.

Cameron

  • Global Moderator
  • Autococker
  • Posts: 2686
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #3 on: April 01, 2008, 09:22:17 PM »
* Cameron sits in confusion on what all of that means but likes it.  I'll keep that for when i get servers (when i grow up) :)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #4 on: April 01, 2008, 09:34:08 PM »
I really need to remember to explain my topics sometimes :<

"If you have a few match servers that you want to let others use, you can install this application on your web server so that they can use them without needing to know your password."

Examples of similar scripts:
http://www.graffiti-taggerz.com/~dpaintball/index-MatchTool.shtml
http://www.otb-server.de/access/register.php
http://qehs.indiereview.co.uk/index.php?site=rent_server

Cameron

  • Global Moderator
  • Autococker
  • Posts: 2686
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #5 on: April 01, 2008, 10:41:18 PM »
Is it the same script, well, close?  Or does it allow completely different things?

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #6 on: April 01, 2008, 11:03:33 PM »
Uh... it's completely different code, but it essentially does the same thing, just with more features (namely the cvar stuff).

Which is why you, Cameron, should convince GT to switch! ;D

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #7 on: April 02, 2008, 01:39:42 AM »
Beta2 has a new theme that's less... text-heavy (but also less informative).

The demo also kind of fake-works now, but you need to enter "test" for the login password to be able to use the cvar-change page.

Cameron

  • Global Moderator
  • Autococker
  • Posts: 2686
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #8 on: April 02, 2008, 04:28:02 AM »
I'll try, maybe when i get around to finishing the new site I might put it on there and casso can do all of the server stuff.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #9 on: April 02, 2008, 10:02:48 AM »
Nifty.  I'll have to play around with this some later.

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: DP Match Server Tool -- for clans with servers that can be leased
« Reply #10 on: April 02, 2008, 10:52:19 AM »
ummmmm.....

Code: [Select]
$CONFIG['user_settings']['snaz-bot'] = array(
'type' => 'bool',
);

?????

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #11 on: May 21, 2008, 11:53:12 PM »
I keep meaning to set this up on my server, but it seems other things keep requiring more immediate attention.  Wish I could SSH from work...

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #12 on: May 22, 2008, 12:16:08 AM »
I keep meaning to set this up on my server, but it seems other things keep requiring more immediate attention.  Wish I could SSH from work...

Firewall stuffs?

lekky

  • Autococker
  • Posts: 2449
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #13 on: June 05, 2008, 06:50:35 PM »
Yeah thats painful, the place where i was working for past 8 months wouldn't let me ssh/ftp either..

Justinph5

  • Autococker
  • Posts: 1159
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #14 on: February 05, 2013, 05:40:54 PM »
Hi guys,

I edited the play.tpl file so that when a server is rented, it gives you a copy/paste code like:  connect 123.456.789.123:12345; password asdf

<p><strong>In-Game Copy/Paste:</strong> connect {$host}:{$port}; password {$password}</p>

If you paste this in the file, and then clear the play.tpl cache, it will update so you can have this too.

CheMiCal

  • Autococker
  • Posts: 690
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #15 on: February 06, 2013, 09:19:36 PM »
tR was playing senix and nookie and force spec is enabled on your servers, was just wondering if you could take it off.

vLaD

  • Autococker
  • Posts: 536
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #16 on: March 30, 2014, 12:12:20 AM »
I'm having a problem where it doesn't apply the server settings. say's it does but it doesn't work. I'll try to figure this out once I get some more time. geektwks.com/match

SuperMAn

  • Committee Member
  • Autococker
  • Posts: 902
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #17 on: March 30, 2014, 07:40:37 AM »
I'm having a problem where it doesn't apply the server settings. say's it does but it doesn't work. I'll try to figure this out once I get some more time. geektwks.com/match

Maybe you forgot to close the quotation marks somewhere?

Also, I will add a link to my site later today.

Davew_

  • PGP
  • Posts: 46
Re: DP Match Server Tool -- for clans with servers that can be reserved
« Reply #18 on: December 27, 2015, 07:38:11 AM »
http://www.davewsgameservers.com/rentdp/

up and working  3 match server  so far