Fix previous commits

This commit is contained in:
def 2014-10-11 01:10:53 +02:00
parent 9c0bb7d02b
commit 2fa361fe4d

View file

@ -1048,7 +1048,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
SendChatTarget(ClientID, "Invalid option");
return;
}
if(!m_apPlayers[ClientID]->m_Authed && (strncmp(pOption->m_aCommand, "sv_map ", 7) == 0 || strncmp(pOption->m_aCommand, "change_map ", 11) == 0 || strncmp(pOption->m_aCommand, "random_map", 11) == 0 || strncmp(pOption->m_aCommand, "random_unfinished_map", 22) == 0) && time_get() < m_LastMapVote + (time_freq() * g_Config.m_SvVoteMapTimeDelay))
if(!m_apPlayers[ClientID]->m_Authed && (strncmp(pOption->m_aCommand, "sv_map ", 7) == 0 || strncmp(pOption->m_aCommand, "change_map ", 11) == 0 || strncmp(pOption->m_aCommand, "random_map", 10) == 0 || strncmp(pOption->m_aCommand, "random_unfinished_map", 21) == 0) && time_get() < m_LastMapVote + (time_freq() * g_Config.m_SvVoteMapTimeDelay))
{
char chatmsg[512] = {0};
str_format(chatmsg, sizeof(chatmsg), "There's a %d second delay between map-votes, please wait %d seconds.", g_Config.m_SvVoteMapTimeDelay,((m_LastMapVote+(g_Config.m_SvVoteMapTimeDelay * time_freq()))/time_freq())-(time_get()/time_freq()));
@ -1061,9 +1061,9 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
pOption->m_aDescription, pReason);
str_format(aDesc, sizeof(aDesc), "%s", pOption->m_aDescription);
if((strncmp(pOption->m_aCommand, "random_map", 11) == 0 || strncmp(pOption->m_aCommand, "random_unfinished_map", 22) == 0) && str_length(pReason) == 1 && pReason[0] >= '1' && pReason[0] <= '5')
if((strncmp(pOption->m_aCommand, "random_map", 10) == 0 || strncmp(pOption->m_aCommand, "random_unfinished_map", 21) == 0) && str_length(pReason) == 1 && pReason[0] >= '1' && pReason[0] <= '5')
{
int stars = pReason[0] - '1';
int stars = pReason[0] - '0';
str_format(aCmd, sizeof(aCmd), "%s %d", pOption->m_aCommand, stars);
}
else