CClient: Only auth users that sent a password

We introduced a bug where sending "USER foo\r\nNICK foo\r\n" to znc would cause
an "invalid password" message even though no password was sent yet. This was
caused by a missing check.

This is easily fixed by checking whether we already received a password before
checking if the password is valid.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2117 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-09-05 15:57:35 +00:00
parent 4b74817fdf
commit 8af157cc69
+1 -1
View File
@@ -590,7 +590,7 @@ bool CClient::SendMotd() {
}
void CClient::AuthUser() {
if (!m_bGotNick || !m_bGotUser || m_bInCap || IsAttached())
if (!m_bGotNick || !m_bGotUser || !m_bGotPass || m_bInCap || IsAttached())
return;
m_spAuth = new CClientAuth(this, m_sUser, m_sPass);