Fix kick reason being ignored in callvote
This commit is contained in:
parent
0df8256e28
commit
19c8736354
@ -106,7 +106,7 @@ void do_random_votekick()
|
||||
player_info_s info;
|
||||
if (!g_IEngine->GetPlayerInfo(g_IEngine->GetPlayerForUserID(target), &info))
|
||||
return;
|
||||
hack::ExecuteCommand("callvote kick " + std::to_string(target) + " cheating");
|
||||
hack::ExecuteCommand("callvote kick \"" + std::to_string(target) + " cheating\"");
|
||||
}
|
||||
|
||||
void update_catbot_list()
|
||||
|
@ -22,7 +22,7 @@ static bool was_local_player{ false };
|
||||
static void vote_rage_back()
|
||||
{
|
||||
static Timer attempt_vote_time;
|
||||
char cmd[36];
|
||||
char cmd[40];
|
||||
player_info_s info;
|
||||
std::vector<int> targets;
|
||||
|
||||
@ -46,8 +46,8 @@ static void vote_rage_back()
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
std::snprintf(cmd, sizeof(cmd), "callvote kick %d cheating", targets[UniformRandomInt(0, targets.size() - 1)]);
|
||||
g_IEngine->ExecuteClientCmd(cmd);
|
||||
std::snprintf(cmd, sizeof(cmd), "callvote kick \"%d cheating\"", targets[UniformRandomInt(0, targets.size() - 1)]);
|
||||
g_IEngine->ClientCmd_Unrestricted(cmd);
|
||||
}
|
||||
|
||||
void dispatchUserMessage(bf_read &buffer, int type)
|
||||
|
Reference in New Issue
Block a user