fix save message
This commit is contained in:
parent
6a4ca89adb
commit
13d209a00a
@ -20,7 +20,7 @@ class GuestlistManager implements CommandListener, Plugin {
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 154;
|
const PLUGIN_ID = 154;
|
||||||
const PLUGIN_VERSION = 1.2;
|
const PLUGIN_VERSION = 1.3;
|
||||||
const PLUGIN_NAME = 'Guestlist Manager';
|
const PLUGIN_NAME = 'Guestlist Manager';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
@ -224,13 +224,13 @@ class GuestlistManager implements CommandListener, Plugin {
|
|||||||
$this->maniaControl->getClient()->loadGuestList($guestlist);
|
$this->maniaControl->getClient()->loadGuestList($guestlist);
|
||||||
|
|
||||||
$this->maniaControl->getClient()->cleanGuestList();
|
$this->maniaControl->getClient()->cleanGuestList();
|
||||||
foreach ($currentguestlist as $player) {
|
foreach ($currentguestlist as $guest) {
|
||||||
$this->maniaControl->getClient()->addGuest($player->login);
|
$this->maniaControl->getClient()->addGuest($guest->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->maniaControl->getClient()->saveGuestList($guestlist);
|
$this->maniaControl->getClient()->saveGuestList($guestlist);
|
||||||
|
|
||||||
$this->maniaControl->getChat()->sendSuccess( "Guestlist saved!" , $player);
|
$this->maniaControl->getChat()->sendSuccess("Guestlist saved!" , $player);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Logger::logError("Impossible to save guestlist: " . $e->getMessage());
|
Logger::logError("Impossible to save guestlist: " . $e->getMessage());
|
||||||
$this->maniaControl->getChat()->sendError("Impossible to save guestlist: " . $e->getMessage(), $player);
|
$this->maniaControl->getChat()->sendError("Impossible to save guestlist: " . $e->getMessage(), $player);
|
||||||
|
Loading…
Reference in New Issue
Block a user