about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-01-06 19:17:14 +0100
committeroy <Tom_Adams@web.de>2012-01-06 19:17:14 +0100
commit29738552a69e5b74410f2667e81243593cc26233 (patch)
treee5d23361c13d44c87be64ccf929d80d008ac6aaa /src/engine/client
parent78bb0e3d8c6c4ea35bc35aada6dfb780930570b2 (diff)
downloadzcatch-29738552a69e5b74410f2667e81243593cc26233.tar.gz
zcatch-29738552a69e5b74410f2667e81243593cc26233.zip
made bindaddr config work for client and master too. Closes #909
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/client.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index a9c86060..34923f28 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -1738,8 +1738,11 @@ void CClient::Run()
 	// open socket
 	{
 		NETADDR BindAddr;
-		mem_zero(&BindAddr, sizeof(BindAddr));
-		BindAddr.type = NETTYPE_ALL;
+		if(g_Config.m_Bindaddr[0] == 0 || net_host_lookup(g_Config.m_Bindaddr, &BindAddr, NETTYPE_ALL) != 0)
+		{
+			mem_zero(&BindAddr, sizeof(BindAddr));
+			BindAddr.type = NETTYPE_ALL;
+		}
 		if(!m_NetClient.Open(BindAddr, 0))
 		{
 			dbg_msg("client", "couldn't start network");