From 0aade219602a6b9fcae3d498af76920749ea5409 Mon Sep 17 00:00:00 2001 From: def Date: Thu, 11 Jul 2013 02:54:54 +0200 Subject: [PATCH] Only allow voting team members to spectators to prevent abuse --- src/game/server/gamecontext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index a41725157..c20bdc75e 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1011,6 +1011,12 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) 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) { 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);