mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Don't handle USER lines at all when the client is already logged in.
Fix bug 1797023 from sf.net bug tracker. Thanks to Zigara. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@840 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
32
Client.cpp
32
Client.cpp
@@ -50,9 +50,9 @@ void CClient::ReadLine(const CString& sData) {
|
||||
if ((m_bGotNick) && (m_bGotUser)) {
|
||||
AuthUser();
|
||||
}
|
||||
}
|
||||
|
||||
return; // Don't forward this msg. ZNC has already registered us.
|
||||
return; // Don't forward this msg. ZNC has already registered us.
|
||||
}
|
||||
} else if (sCommand.CaseCmp("NICK") == 0) {
|
||||
CString sNick = sLine.Token(1);
|
||||
if (sNick.Left(1) == ":") {
|
||||
@@ -91,19 +91,23 @@ void CClient::ReadLine(const CString& sData) {
|
||||
}
|
||||
}
|
||||
} else if (sCommand.CaseCmp("USER") == 0) {
|
||||
if ((!m_bAuthed) && (m_sUser.empty())) {
|
||||
m_sUser = sLine.Token(1);
|
||||
if (!m_bAuthed) {
|
||||
if (m_sUser.empty()) {
|
||||
m_sUser = sLine.Token(1);
|
||||
}
|
||||
|
||||
m_bGotUser = true;
|
||||
|
||||
if ((m_bGotPass) && (m_bGotNick)) {
|
||||
AuthUser();
|
||||
} else if (!m_bGotPass) {
|
||||
PutClient(":irc.znc.com NOTICE AUTH :*** " +
|
||||
"You need to send your password. " +
|
||||
"Try /quote PASS <username>:<password>");
|
||||
}
|
||||
|
||||
return; // Don't forward this msg. ZNC has already registered us.
|
||||
}
|
||||
|
||||
m_bGotUser = true;
|
||||
|
||||
if ((m_bGotPass) && (m_bGotNick)) {
|
||||
AuthUser();
|
||||
} else if (!m_bGotPass) {
|
||||
PutClient(":irc.znc.com NOTICE AUTH :*** You need to send your password. Try /quote PASS <username>:<password>");
|
||||
}
|
||||
|
||||
return; // Don't forward this msg. ZNC has already registered us.
|
||||
}
|
||||
|
||||
if (!m_pUser) {
|
||||
|
||||
Reference in New Issue
Block a user