From 7c5f8efddabd4704f926f719b039fc38f1e67cc2 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 13 May 2017 19:27:38 +0200 Subject: [PATCH] MC HOTFIX, UPDATE FAST!!! --- core/ManiaControl.php | 1 + core/Maps/MapManager.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/ManiaControl.php b/core/ManiaControl.php index a7592f51..cad9442f 100644 --- a/core/ManiaControl.php +++ b/core/ManiaControl.php @@ -578,6 +578,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener, // Load plugins $this->getPluginManager()->loadPlugins(); + $this->getUpdateManager()->getPluginUpdateManager()->checkPluginsUpdate(); // AfterInit callback diff --git a/core/Maps/MapManager.php b/core/Maps/MapManager.php index 1e4c4ef0..c363abd2 100644 --- a/core/Maps/MapManager.php +++ b/core/Maps/MapManager.php @@ -508,7 +508,7 @@ class MapManager implements CallbackListener, CommunicationListener, UsageInform try { $offset = 0; - while ($this->maniaControl->getClient()) { + while ($this->maniaControl->getClient() && $offset < 5000) { $maps = $this->maniaControl->getClient()->getMapList(150, $offset); foreach ($maps as $rpcMap) { @@ -524,6 +524,7 @@ class MapManager implements CallbackListener, CommunicationListener, UsageInform $offset += 150; } + } catch (IndexOutOfBoundException $e) { }