Code Cleanup

This commit is contained in:
Steffen Schröder 2013-12-09 13:07:03 +01:00
parent 570696ad45
commit 5339b6766f
13 changed files with 10 additions and 22 deletions

View File

@ -1,5 +1,4 @@
<?php <?php
use ManiaControl\ManiaControl;
// Define base dir // Define base dir
define('ManiaControlDir', __DIR__); define('ManiaControlDir', __DIR__);
@ -11,8 +10,10 @@ if (function_exists('date_default_timezone_get') && function_exists('date_defaul
} }
// Error handling // Error handling
ini_set('log_errors', 1); ini_set('log_errors', true);
ini_set('display_errors', '1');
ini_set('error_reporting', -1); ini_set('error_reporting', -1);
ini_set('display_startup_errors', true);
if (!is_dir('logs')) { if (!is_dir('logs')) {
mkdir('logs'); mkdir('logs');
} }
@ -22,9 +23,7 @@ ini_set('error_log', 'logs/ManiaControl_' . getmypid() . '.log');
require_once __DIR__ . '/core/ManiaControl.php'; require_once __DIR__ . '/core/ManiaControl.php';
// Start ManiaControl // Start ManiaControl
error_log('Loading ManiaControl v' . ManiaControl::VERSION . '...'); error_log('Loading ManiaControl v' . ManiaControl\ManiaControl::VERSION . '...');
$maniaControl = new ManiaControl(); $maniaControl = new ManiaControl\ManiaControl();
$maniaControl->run(); $maniaControl->run();
?>

View File

@ -1428,4 +1428,4 @@ class GBXPackFetcher extends GBXBaseFetcher
} // processGBX } // processGBX
} // class GBXPackFetcher } // class GBXPackFetcher
?>

View File

@ -303,4 +303,4 @@ class MXInfoFetcher {
} }
} // get_file } // get_file
} // class MXInfoFetcher } // class MXInfoFetcher
?>

View File

@ -322,4 +322,4 @@ class MXInfo {
} }
} // MXInfo } // MXInfo
} // class MXInfo } // class MXInfo
?>

View File

@ -151,6 +151,7 @@ class MapCommands implements CommandListener {
return true; return true;
} }
// TODO: add local map by filename // TODO: add local map by filename
return false;
} }
/** /**

View File

@ -889,4 +889,3 @@ function big_endian_unpack($format, $data) {
} }
return $ar; return $ar;
} }
?>

View File

@ -852,4 +852,4 @@ class IXR_ClientMulticall_Gbx extends IXR_Client_Gbx {
return $result; return $result;
} }
} }
?>

View File

@ -140,5 +140,3 @@ class ChatlogPlugin implements CallbackListener, Plugin {
file_put_contents($this->fileName, $message, FILE_APPEND); file_put_contents($this->fileName, $message, FILE_APPEND);
} }
} }
?>

View File

@ -274,5 +274,3 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
return $this->maniaControl->chat->sendChat($message, $player->login); return $this->maniaControl->chat->sendChat($message, $player->login);
} }
} }
?>

View File

@ -125,5 +125,3 @@ class EndurancePlugin implements CallbackListener, Plugin {
$this->maniaControl->callbackManager->triggerCallback(CallbackManager::CB_TM_PLAYERFINISH, $finishCallback); $this->maniaControl->callbackManager->triggerCallback(CallbackManager::CB_TM_PLAYERFINISH, $finishCallback);
} }
} }
?>

View File

@ -472,5 +472,3 @@ class KarmaPlugin implements CallbackListener, Plugin {
$this->manialink = $manialink; $this->manialink = $manialink;
} }
} }
?>

View File

@ -407,4 +407,3 @@ class LocalRecordsPlugin implements CallbackListener, Plugin {
} }
} }
?>

View File

@ -139,5 +139,3 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin {
$this->maniaControl->callbackManager->triggerCallback(CallbackManager::CB_TM_PLAYERCHECKPOINT, $finishCallback); $this->maniaControl->callbackManager->triggerCallback(CallbackManager::CB_TM_PLAYERCHECKPOINT, $finishCallback);
} }
} }
?>