Only allow voting team members to spectators to prevent abuse

This commit is contained in:
def 2013-07-11 02:54:54 +02:00
parent d289e4d50f
commit 0aade21960

View file

@ -1011,6 +1011,12 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
return; return;
} }
if(GetPlayerChar(ClientID) && GetPlayerChar(SpectateID) && GetDDRaceTeam(ClientID) != GetDDRaceTeam(SpectateID))
{
SendChatTarget(ClientID, "You can only move your team member to specators");
return;
}
if(g_Config.m_SvPauseable && g_Config.m_SvVotePause) if(g_Config.m_SvPauseable && g_Config.m_SvVotePause)
{ {
str_format(aChatmsg, sizeof(aChatmsg), "'%s' called for vote to pause '%s' for %d seconds (%s)", Server()->ClientName(ClientID), Server()->ClientName(SpectateID), g_Config.m_SvVotePauseTime, pReason); str_format(aChatmsg, sizeof(aChatmsg), "'%s' called for vote to pause '%s' for %d seconds (%s)", Server()->ClientName(ClientID), Server()->ClientName(SpectateID), g_Config.m_SvVotePauseTime, pReason);