From 2fa361fe4d3e64031ef4e5446e248931f900d4e8 Mon Sep 17 00:00:00 2001 From: def Date: Sat, 11 Oct 2014 01:10:53 +0200 Subject: [PATCH] Fix previous commits --- src/game/server/gamecontext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 3608ddc6e..517fef67b 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -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