From 45e4417f9797d156e244c7191627cb06b794b13f Mon Sep 17 00:00:00 2001 From: Beu Date: Fri, 15 Dec 2023 11:14:23 +0100 Subject: [PATCH] fix using the wrong method --- Beu/BlacklistManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Beu/BlacklistManager.php b/Beu/BlacklistManager.php index 7b2a1b2..d26a887 100644 --- a/Beu/BlacklistManager.php +++ b/Beu/BlacklistManager.php @@ -127,7 +127,7 @@ class BlacklistManager implements CommandListener, Plugin { if (!isset($login)) { $this->maniaControl->getChat()->sendError( "Login not found. FYI The player must be connected" , $player); } else { - if ($this->addLoginToGL($login)) { + if ($this->addLoginToBL($login)) { $this->maniaControl->getChat()->sendSuccess( "Player " . $peopletoadd . " added to the Blacklist" , $player); } else { $this->maniaControl->getChat()->sendSuccess( "Player " . $peopletoadd . " already in the Blacklist" , $player); @@ -142,14 +142,14 @@ class BlacklistManager implements CommandListener, Plugin { * @param string $login * @param array $blacklist */ - public function addLoginToGL(String $login, array $blacklist = []) { + public function addLoginToBL(String $login, array $blacklist = []) { if (empty($blacklist)) { $blacklist = $this->maniaControl->getClient()->getBlackList(); } $logintoadd = ""; $logintoadd = array_search($login ,array_column($blacklist, 'login')); if (strlen($logintoadd) == 0) { - $this->maniaControl->getClient()->addGuest($login); + $this->maniaControl->getClient()->blackList($login); return true; } else { return false;