Gamecp/codeaddons

From GameCPWiki

Jump to: navigation, search

Contents

Running 2 instances of GameCP sharing MySQL. (php)

Overview

This allows you to basically host 1 master GameCP install with sub-installs sharing the same data.

Good example: www.mywebsite.com/gamecp www.unlrelatedwebsite.com/gamecp

The unrelatedwebsite has no relation to mywebsite.com, users dont need to see any information about the main panel that controls everything.

Configure your master server

You need to have a master server already running in order to do this, please make sure you have this and it is working properly.

Configure the secondary GameCP

  • Install the GameCP master files onto your new domain name.
  • Copy the master installs includes/mysql.inc.php to the new domain name.
  • Edit the new domains includes/overide.inc.php inserting the below contents.

Replace the example variables:

<? 
  // No trailing slashes on each.
  // Uncomment to enable. 
  $url = "http://newwebsite/gamecp"; 
  $PATH = "/var/www/html/newsite/gamecp"; 
  define("LOGOUTURL", "http://properlogout.com");
  define("url", $url); 
  define("path", $PATH); 
?>


Generate a list of gametype ip:port for webpages (bash)

Running the statsgen.php script will create a file with the list of your games in the format protocol ip:port ie:

Q3S 127.0.0.1:27960

This is ideal for tools like UglyGS and anything that uses Qstat to generate stats for the web.

To create your file simply:

cd /path/to/gamecp/www/system 
php statsgen.php /path/to/file
/path/to/file is the file that will be created with the list.
Personal tools
download
communication