Fixed LOGM_CLIENTS_LOG not handling connections errors
@@ -66,7 +66,7 @@ bool CClient::addLoginErr(BYTE code)
// LOGIN_ERR_OTHER
if ( code == PacketLoginError::Success )
- return( true );
+ return true;
// console message to display for each login error code
static LPCTSTR const sm_Login_ErrMsg[] =
@@ -97,6 +97,7 @@ bool CClient::addLoginErr(BYTE code)
if ( code >= COUNTOF(sm_Login_ErrMsg) )
code = PacketLoginError::Other;
+ if ( g_Log.GetLogMask() & LOGM_CLIENTS_LOG )
g_Log.EventWarn("%lx:Bad Login %d (%s)\n", GetSocketID(), code, sm_Login_ErrMsg[static_cast<size_t>(code)]);
// translate the code into a code the client will understand
@@ -137,7 +138,7 @@ bool CClient::addLoginErr(BYTE code)
new PacketLoginError(this, static_cast<PacketLoginError::Reason>(code));
m_NetState->markReadClosed();
- return( false );
+ return false;
}
