From 7bfed84be708917605d7d70deb5d72763526bd43 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Thu, 1 Jun 2017 17:58:19 +0300 Subject: [PATCH] Handling of failure of MoveToTeam. --- qcsrc/server/command/sv_cmd.qc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index c403e28f1..f309f1f39 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1099,9 +1099,15 @@ void GameCommand_moveplayer(float request, float argc) // If so, lets continue and finally move the player client.team_forced = 0; - MoveToTeam(client, team_id, 6); - successful = strcat(successful, (successful ? ", " : ""), playername(client, false)); - LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n"); + if (MoveToTeam(client, team_id, 6)) + { + successful = strcat(successful, (successful ? ", " : ""), playername(client, false)); + LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n"); + } + else + { + LOG_INFO("Unable to move player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ")"); + } continue; } else -- 2.39.2