forked from Mirrors/openclonk
Fix indentation on masterserver web/server/index.php
parent
146679c7ef
commit
2b33a55cfb
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
/**
|
||||
* C4Masterserver engine backend
|
||||
*
|
||||
* @package C4Masterserver
|
||||
|
@ -10,21 +10,21 @@
|
|||
*/
|
||||
//error_reporting(E_ALL); //suppress errors
|
||||
|
||||
require_once('include/C4Masterserver.php');
|
||||
require_once('include/C4Network.php');
|
||||
require_once('include/FloodProtection.php');
|
||||
require_once('include/ParseINI.php');
|
||||
require_once('include/C4Masterserver.php');
|
||||
require_once('include/C4Network.php');
|
||||
require_once('include/FloodProtection.php');
|
||||
require_once('include/ParseINI.php');
|
||||
|
||||
$config = file_get_contents('include/config.ini');
|
||||
$link = mysql_connect(
|
||||
$config = file_get_contents('include/config.ini');
|
||||
$link = mysql_connect(
|
||||
ParseINI::parseValue('mysql_host', $config),
|
||||
ParseINI::parseValue('mysql_user', $config),
|
||||
ParseINI::parseValue('mysql_password', $config)); //connect to MySQL
|
||||
$db = mysql_selectdb(ParseINI::parseValue('mysql_db', $config), $link); //select the database
|
||||
$db = mysql_selectdb(ParseINI::parseValue('mysql_db', $config), $link); //select the database
|
||||
|
||||
header('Content-Type: text/plain'); //output as plain text
|
||||
header('Content-Type: text/plain'); //output as plain text
|
||||
|
||||
if ($link && $db) {
|
||||
if ($link && $db) {
|
||||
$prefix = ParseINI::parseValue('mysql_prefix', $config);
|
||||
$server = new C4Masterserver($link, $config);
|
||||
$server->setTimeoutgames(intval(ParseINI::parseValue('c4ms_timeoutgames', $config)));
|
||||
|
@ -157,8 +157,8 @@
|
|||
C4Network::sendAnswer($message);
|
||||
}
|
||||
mysql_close($link);
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
C4Network::sendAnswer(C4Network::createError('Database error.'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue