From f6d7bb3d887748d6ec70ad07561ed81ca4c88f53 Mon Sep 17 00:00:00 2001 From: Max Klaversma Date: Thu, 13 Feb 2014 19:16:16 +0100 Subject: [PATCH] Don't try to force player into team in a non-team mode --- application/plugins/QueuePlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/plugins/QueuePlugin.php b/application/plugins/QueuePlugin.php index ffec0012..a9c2b8f2 100644 --- a/application/plugins/QueuePlugin.php +++ b/application/plugins/QueuePlugin.php @@ -324,7 +324,9 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns } try { - $this->maniaControl->client->forcePlayerTeam($player->login, $smallestTeam); + if($smallestTeam != -1) { + $this->maniaControl->client->forcePlayerTeam($player->login, $smallestTeam); + } } catch(Exception $e) { // TODO: only possible valid exceptions should be "wrong login" or "not in team mode" - throw others (like connection error) }