mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Only allow voting team members to spectators to prevent abuse
This commit is contained in:
parent
d289e4d50f
commit
0aade21960
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue