| 5370 | } |
| 5371 | |
| 5372 | bool CGameContext::RateLimitPlayerMapVote(int ClientId) const |
| 5373 | { |
| 5374 | if(!Server()->IsRconAuthed(ClientId) && time_get() < m_LastMapVote + (time_freq() * g_Config.m_SvVoteMapTimeDelay)) |
| 5375 | { |
| 5376 | char aChatMessage[128]; |
| 5377 | str_format(aChatMessage, sizeof(aChatMessage), "There's a %d second delay between map-votes, please wait %d seconds.", |
| 5378 | g_Config.m_SvVoteMapTimeDelay, (int)((m_LastMapVote + g_Config.m_SvVoteMapTimeDelay * time_freq() - time_get()) / time_freq())); |
| 5379 | SendChatTarget(ClientId, aChatMessage); |
| 5380 | return true; |
| 5381 | } |
| 5382 | return false; |
| 5383 | } |
| 5384 | |
| 5385 | void CGameContext::OnUpdatePlayerServerInfo(CJsonWriter *pJsonWriter, int ClientId) |
| 5386 | { |
no test coverage detected