From 28e4a57a78a53c128d5298e0b8d36b3efdfbf197 Mon Sep 17 00:00:00 2001 From: kremsy Date: Thu, 16 Jan 2014 19:49:36 +0100 Subject: [PATCH] some fixes --- application/core/Players/PlayerActions.php | 5 +++++ application/core/Server/ServerCommands.php | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/application/core/Players/PlayerActions.php b/application/core/Players/PlayerActions.php index 7d8e6773..b428f1e3 100644 --- a/application/core/Players/PlayerActions.php +++ b/application/core/Players/PlayerActions.php @@ -367,6 +367,11 @@ class PlayerActions { return; } + if($target->isFakePlayer()) { + $this->maniaControl->chat->sendError('It is not possible to Ban a bot', $admin->login); + return; + } + $success = $this->maniaControl->client->ban($target->login, $message); if(!$success) { $this->maniaControl->chat->sendError('Error occurred: ' . $this->maniaControl->getClientErrorText(), $admin->login); diff --git a/application/core/Server/ServerCommands.php b/application/core/Server/ServerCommands.php index da88fea1..a116153e 100644 --- a/application/core/Server/ServerCommands.php +++ b/application/core/Server/ServerCommands.php @@ -102,11 +102,8 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage $this->maniaControl->authenticationManager->sendNotAllowed($player); return; } - $success = $this->maniaControl->client->cancelVote(); - if(!$success) { - $this->maniaControl->chat->sendError('Error occurred: ' . $this->maniaControl->getClientErrorText(), $player->login); - return; - } + $this->maniaControl->client->cancelVote(); + $this->maniaControl->chat->sendInformation('$<' . $player->nickname . '$> canceled the Vote!'); // Trigger callback