Display a message when an admin forces a vote. Closes #759

This commit is contained in:
Romain Labolle 2011-07-10 13:02:13 +02:00 committed by oy
parent fc13cc6c18
commit a6dc6f34b6

View file

@ -1264,6 +1264,8 @@ void CGameContext::ConForceVote(IConsole::IResult *pResult, void *pUserData)
return;
}
str_format(aBuf, sizeof(aBuf), "admin moved '%s' to spectator (%s)", pSelf->Server()->ClientName(SpectateID), pReason);
pSelf->SendChatTarget(-1, aBuf);
str_format(aBuf, sizeof(aBuf), "set_team %d -1 %d", SpectateID, g_Config.m_SvVoteSpectateRejoindelay);
pSelf->Console()->ExecuteLine(aBuf);
}
@ -1290,6 +1292,8 @@ void CGameContext::ConVote(IConsole::IResult *pResult, void *pUserData)
else if(str_comp_nocase(pResult->GetString(0), "no") == 0)
pSelf->m_VoteEnforce = CGameContext::VOTE_ENFORCE_NO;
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "admin forced vote %s", pResult->GetString(0));
pSelf->SendChatTarget(-1, aBuf);
str_format(aBuf, sizeof(aBuf), "forcing vote %s", pResult->GetString(0));
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aBuf);
}