From 13d209a00af3b43f5d310309a63c66810be2d3e6 Mon Sep 17 00:00:00 2001 From: Beu Date: Mon, 22 May 2023 17:28:58 +0200 Subject: [PATCH] fix save message --- Beu/GuestlistManager.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Beu/GuestlistManager.php b/Beu/GuestlistManager.php index 9fca985..8f8c1f8 100644 --- a/Beu/GuestlistManager.php +++ b/Beu/GuestlistManager.php @@ -20,7 +20,7 @@ class GuestlistManager implements CommandListener, Plugin { * Constants */ const PLUGIN_ID = 154; - const PLUGIN_VERSION = 1.2; + const PLUGIN_VERSION = 1.3; const PLUGIN_NAME = 'Guestlist Manager'; const PLUGIN_AUTHOR = 'Beu'; @@ -224,13 +224,13 @@ class GuestlistManager implements CommandListener, Plugin { $this->maniaControl->getClient()->loadGuestList($guestlist); $this->maniaControl->getClient()->cleanGuestList(); - foreach ($currentguestlist as $player) { - $this->maniaControl->getClient()->addGuest($player->login); + foreach ($currentguestlist as $guest) { + $this->maniaControl->getClient()->addGuest($guest->login); } $this->maniaControl->getClient()->saveGuestList($guestlist); - $this->maniaControl->getChat()->sendSuccess( "Guestlist saved!" , $player); + $this->maniaControl->getChat()->sendSuccess("Guestlist saved!" , $player); } catch (\Exception $e) { Logger::logError("Impossible to save guestlist: " . $e->getMessage()); $this->maniaControl->getChat()->sendError("Impossible to save guestlist: " . $e->getMessage(), $player);