about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorChoupom <andycootlapin@hotmail.fr>2010-09-06 12:32:41 +0200
committeroy <Tom_Adams@web.de>2010-09-08 00:20:59 +0200
commit71109a98fbcb753e8ab064099e4a2d8dc671481b (patch)
treeba848f7cece7972da5944c8484bc727e0474dc42 /src/game/client
parent532ea85aebc9dc2ce6d87fe484766bf37ab40970 (diff)
downloadzcatch-71109a98fbcb753e8ab064099e4a2d8dc671481b.tar.gz
zcatch-71109a98fbcb753e8ab064099e4a2d8dc671481b.zip
fixed chat message with missing name (#110)
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/components/chat.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp
index d082bf78..60b62188 100644
--- a/src/game/client/components/chat.cpp
+++ b/src/game/client/components/chat.cpp
@@ -126,6 +126,9 @@ void CChat::OnMessage(int MsgType, void *pRawMsg)
 
 void CChat::AddLine(int ClientId, int Team, const char *pLine)
 {
+	if(ClientId != -1 && m_pClient->m_aClients[ClientId].m_aName[0] == '\0') // unknown client
+		return;
+	
 	char *p = const_cast<char*>(pLine);
 	while(*p)
 	{