mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Remove an unused var from CClient
If CClient::m_bAuthed was false, CClient::m_pUser was NULL as well and if it was true, m_pUser wasn't NULL, too. So why not take that var for this job? git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1003 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
11
Client.cpp
11
Client.cpp
@@ -35,7 +35,7 @@ void CClient::ReadLine(const CString& sData) {
|
||||
DEBUG_ONLY(cout << "(" << ((m_pUser) ? m_pUser->GetUserName() : CString("")) << ") CLI -> ZNC [" << sLine << "]" << endl);
|
||||
|
||||
#ifdef _MODULES
|
||||
if (m_bAuthed) {
|
||||
if (IsAttached()) {
|
||||
MODULECALL(OnUserRaw(sLine), m_pUser, this, return);
|
||||
}
|
||||
#endif
|
||||
@@ -43,7 +43,7 @@ void CClient::ReadLine(const CString& sData) {
|
||||
CString sCommand = sLine.Token(0);
|
||||
|
||||
if (sCommand.CaseCmp("PASS") == 0) {
|
||||
if (!m_bAuthed) {
|
||||
if (!IsAttached()) {
|
||||
m_bGotPass = true;
|
||||
m_sPass = sLine.Token(1);
|
||||
|
||||
@@ -64,7 +64,7 @@ void CClient::ReadLine(const CString& sData) {
|
||||
sNick.LeftChomp();
|
||||
}
|
||||
|
||||
if (!m_bAuthed) {
|
||||
if (!IsAttached()) {
|
||||
m_sNick = sNick;
|
||||
m_bGotNick = true;
|
||||
|
||||
@@ -96,7 +96,7 @@ void CClient::ReadLine(const CString& sData) {
|
||||
}
|
||||
}
|
||||
} else if (sCommand.CaseCmp("USER") == 0) {
|
||||
if (!m_bAuthed) {
|
||||
if (!IsAttached()) {
|
||||
if (m_sUser.empty()) {
|
||||
m_sUser = sLine.Token(1);
|
||||
}
|
||||
@@ -1841,7 +1841,6 @@ void CClient::AcceptLogin(CUser& User) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_bAuthed = true;
|
||||
SetSockName("USR::" + m_pUser->GetUserName());
|
||||
|
||||
m_pIRCSock = (CIRCSock*) CZNC::Get().FindSockByName("IRC::" + m_pUser->GetUserName());
|
||||
@@ -1934,7 +1933,7 @@ void CClient::PutModule(const CString& sModule, const CString& sLine) {
|
||||
CString CClient::GetNick(bool bAllowIRCNick) const {
|
||||
CString sRet;
|
||||
|
||||
if ((bAllowIRCNick) && (m_bAuthed) && (m_pIRCSock)) {
|
||||
if ((bAllowIRCNick) && (IsAttached()) && (m_pIRCSock)) {
|
||||
sRet = m_pIRCSock->GetNick();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user