From 3cecfc300738f572ccec4626a06163e46a6fa567 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 9 Nov 2013 20:17:42 +0100 Subject: [PATCH] begin of playerclass --- application/.idea/workspace.xml | 149 +++++++++++++++++++++++--------- application/core/core.php | 14 ++- 2 files changed, 122 insertions(+), 41 deletions(-) diff --git a/application/.idea/workspace.xml b/application/.idea/workspace.xml index b3b2d00c..f2d8d094 100644 --- a/application/.idea/workspace.xml +++ b/application/.idea/workspace.xml @@ -23,10 +23,57 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + @@ -55,14 +102,16 @@ - @@ -110,6 +159,24 @@ - + @@ -283,25 +350,6 @@ - - - - - - - - - - - - - - - - - - - @@ -323,13 +371,6 @@ - - - - - - - @@ -365,13 +406,6 @@ - - - - - - - @@ -386,9 +420,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + diff --git a/application/core/core.php b/application/core/core.php index 1b8598dc..4ed6fa73 100644 --- a/application/core/core.php +++ b/application/core/core.php @@ -14,6 +14,9 @@ require_once __DIR__ . '/server.php'; require_once __DIR__ . '/stats.php'; require_once __DIR__ . '/tools.php'; require_once __DIR__ . '/pluginHandler.php'; +require_once __DIR__ . '/plugin.php'; +require_once __DIR__ . '/playerHandler.php'; +require_once __DIR__ . '/player.php'; require_once __DIR__ . '/manialinkIdHandler.php'; list($endiantest) = array_values(unpack('L1L', pack('V', 1))); if ($endiantest == 1) { @@ -72,7 +75,7 @@ class ManiaControl { /** * Private properties */ - private $plugins = array(); + //private $plugins = array(); private $shutdownRequested = false; @@ -99,6 +102,9 @@ class ManiaControl { // Load authentication $this->authentication = new Authentication($this); + // Load playerHandler + $this->playerHandler = new PlayerHandler($this); + // Load manialinkidHandler $this->manialinkIdHandler = new ManialinkIdHandler(); @@ -115,7 +121,7 @@ class ManiaControl { $this->callbacks->registerCallbackHandler(Callbacks::CB_MP_ENDMAP, $this, 'handleEndMap'); // Set ManiaControl version - $this->version = VERSION; + $this->version = self::VERSION; } /** @@ -301,6 +307,10 @@ class ManiaControl { } } } + + $this->client->query('GetPlayerList', 300, 0, 2); + $this->playerHandler->addPlayerList($this->client->getResponse()); + } /**