about summary refs log tree commit diff
path: root/src/engine/client/client.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-03-15 09:58:57 +0100
committeroy <Tom_Adams@web.de>2011-03-15 09:58:57 +0100
commit27e5a6af0d09192e1a865332f35bde4a0ac180dd (patch)
tree65027504bc580101b39605714cc801dcb5b8e000 /src/engine/client/client.cpp
parent7b91ebd01cc0a0f466518144e82778fe95d3aed8 (diff)
downloadzcatch-27e5a6af0d09192e1a865332f35bde4a0ac180dd.tar.gz
zcatch-27e5a6af0d09192e1a865332f35bde4a0ac180dd.zip
made clients sending startinfo a requirement to prevent empty player infos
Diffstat (limited to 'src/engine/client/client.cpp')
-rw-r--r--src/engine/client/client.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index 5ed0b37b..1c0a3a01 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -518,8 +518,6 @@ void CClient::SendInfo()
 {
 	CMsgPacker Msg(NETMSG_INFO);
 	Msg.AddString(GameClient()->NetVersion(), 128);
-	Msg.AddString(g_Config.m_PlayerName, 128);
-	Msg.AddString(g_Config.m_ClanName, 128);
 	Msg.AddString(g_Config.m_Password, 128);
 	SendMsgEx(&Msg, MSGFLAG_VITAL|MSGFLAG_FLUSH);
 }
@@ -1175,7 +1173,6 @@ void CClient::ProcessPacket(CNetChunk *pPacket)
 					{
 						m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done");
 						SendReady();
-						GameClient()->OnConnected();
 					}
 					else
 					{
@@ -1238,8 +1235,7 @@ void CClient::ProcessPacket(CNetChunk *pPacket)
 					if(!pError)
 					{
 						m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done");
-						SendReady();
-						GameClient()->OnConnected();
+						SendReady();						
 					}
 					else
 						DisconnectWithReason(pError);
@@ -1261,6 +1257,10 @@ void CClient::ProcessPacket(CNetChunk *pPacket)
 					}
 				}
 			}
+			else if(Msg == NETMSG_CON_READY)
+			{
+				GameClient()->OnConnected();
+			}
 			else if(Msg == NETMSG_PING)
 			{
 				CMsgPacker Msg(NETMSG_PING_REPLY);