diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index fa1bcc6f8..607d652ea 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -540,6 +540,9 @@ void CClient::Connect(const char *pAddress, const char *pPassword) Disconnect(); dbg_assert(m_State == IClient::STATE_OFFLINE, "Disconnect must ensure that client is offline"); + char aLastAddr[NETADDR_MAXSTRSIZE]; + net_addr_str(&ServerAddress(), aLastAddr, sizeof(aLastAddr), true); + if(pAddress != m_aConnectAddressStr) str_copy(m_aConnectAddressStr, pAddress); @@ -583,6 +586,12 @@ void CClient::Connect(const char *pAddress, const char *pPassword) OnlySixup = false; net_addr_str(&NextAddr, aNextAddr, sizeof(aNextAddr), true); log_debug("client", "resolved connect address '%s' to %s", aBuffer, aNextAddr); + + if(!str_comp(aNextAddr, aLastAddr)) + { + m_SendPassword = true; + } + aConnectAddrs[NumConnectAddrs] = NextAddr; NumConnectAddrs += 1; }