From 0390b8794d3852f9412b5653a87342545f55f194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sun, 19 Jan 2014 22:48:33 +0100 Subject: [PATCH] callback handling for script begin map callbacks --- application/core/Callbacks/CallbackManager.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/application/core/Callbacks/CallbackManager.php b/application/core/Callbacks/CallbackManager.php index 5445e6f3..1c8bd6c2 100644 --- a/application/core/Callbacks/CallbackManager.php +++ b/application/core/Callbacks/CallbackManager.php @@ -180,7 +180,7 @@ class CallbackManager { // Server Callbacks if (!$this->maniaControl->client) return; - + $callbacks = $this->maniaControl->client->executeCallbacks(); if (!is_array($callbacks)) { trigger_error("Error reading server callbacks. " . $this->maniaControl->getClientErrorText()); @@ -225,6 +225,14 @@ class CallbackManager { $scriptCallbackData = $callback[1]; $scriptCallbackName = $scriptCallbackData[0]; switch ($scriptCallbackName) { + case 'BeginMap': + $this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData); + $this->triggerCallback(self::CB_MC_BEGINMAP, $callback); + break; + case 'LibXmlRpc_BeginMap': + $this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData); + $this->triggerCallback(self::CB_MC_BEGINMAP, $callback); + break; case 'EndMap': $this->triggerScriptCallback($scriptCallbackName, $scriptCallbackData); if (!$this->mapEnded) {