Add logging to all basevote vote results (#1794)

This commit is contained in:
Maxime Leroy 2022-10-30 23:26:17 +01:00 committed by GitHub
parent f7fda0023c
commit 4989666d72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -41,6 +41,8 @@ void PerformCancelVote(int client)
ShowActivity2(client, "[SM] ", "%t", "Cancelled Vote");
LogAction(client, -1, "\"%L\" Cancelled the vote.", client);
CancelVote();
}

View File

@ -298,11 +298,12 @@ public int Handler_VoteCallback(Menu menu, MenuAction action, int param1, int pa
{
/* :TODO: g_voteTarget should be used here and set to -1 if not applicable.
*/
LogAction(-1, -1, "Vote failed.");
LogAction(-1, -1, "Vote failed. %d%% vote required. (Received \"%d\"% of %d votes)", RoundToNearest(100.0*limit), RoundToNearest(100.0*percent), totalVotes);
PrintToChatAll("[SM] %t", "Vote Failed", RoundToNearest(100.0*limit), RoundToNearest(100.0*percent), totalVotes);
}
else
{
LogAction(-1, -1, "Vote successful. (Received \"%d\"% of %d votes)", RoundToNearest(100.0*percent), totalVotes);
PrintToChatAll("[SM] %t", "Vote Successful", RoundToNearest(100.0*percent), totalVotes);
switch (g_voteType)
@ -314,6 +315,7 @@ public int Handler_VoteCallback(Menu menu, MenuAction action, int param1, int pa
strcopy(item, sizeof(item), display);
}
LogAction(-1, -1, "The answer to %s is: %s.", g_voteArg, item);
PrintToChatAll("[SM] %t", "Vote End", g_voteArg, item);
}