mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
check if whisper message has a valid target
This commit is contained in:
parent
4ae94d4745
commit
e8afe5d238
|
@ -380,7 +380,8 @@ void CChat::AddLine(int ClientID, int Mode, const char *pLine, int TargetID)
|
|||
if(*pLine == 0 || (ClientID != -1 && (!g_Config.m_ClShowsocial || !m_pClient->m_aClients[ClientID].m_Active || // unknown client
|
||||
m_pClient->m_aClients[ClientID].m_ChatIgnore ||
|
||||
g_Config.m_ClFilterchat == 2 ||
|
||||
(m_pClient->m_LocalClientID != ClientID && g_Config.m_ClFilterchat == 1 && !m_pClient->m_aClients[ClientID].m_Friend))))
|
||||
(m_pClient->m_LocalClientID != ClientID && g_Config.m_ClFilterchat == 1 && !m_pClient->m_aClients[ClientID].m_Friend)))
|
||||
|| (TargetID == -1 && Mode == CHAT_WHISPER))
|
||||
return;
|
||||
|
||||
// trim right and set maximum length to 128 utf8-characters
|
||||
|
|
Loading…
Reference in a new issue