From d76f193b6b2d2658e6b51d5493273fb623f6593c Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 15 Mar 2010 15:36:04 +0000 Subject: [PATCH] Remove a self-assignment due to copy&paste git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1831 726aef4b-f618-498e-8847-2d620e286838 --- WebModules.cpp | 7 ++----- WebModules.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/WebModules.cpp b/WebModules.cpp index b63abd56..bc67da7f 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -527,7 +527,7 @@ bool CWebSock::OnPageRequestInternal(const CString& sURI, CString& sPageRet) { if (GetParam("submitted").ToBool()) { m_sUser = GetParam("user"); m_sPass = GetParam("pass"); - m_bLoggedIn = OnLogin(m_sUser, m_sPass); + OnLogin(m_sUser, m_sPass); Redirect("/"); return true; @@ -661,7 +661,7 @@ CSmartPtr CWebSock::GetSession() { return spSession; } -bool CWebSock::OnLogin(const CString& sUser, const CString& sPass) { +void CWebSock::OnLogin(const CString& sUser, const CString& sPass) { DEBUG("=================== CWebSock::OnLogin()"); m_spAuth = new CWebAuth(this, sUser, sPass); @@ -669,9 +669,6 @@ bool CWebSock::OnLogin(const CString& sUser, const CString& sPass) { // until then. CWebAuth will UnPauseRead(). PauseRead(); CZNC::Get().AuthUser(m_spAuth); - - // If CWebAuth already set this, don't change it. - return IsLoggedIn(); } Csock* CWebSock::GetSockObj(const CString& sHost, unsigned short uPort) { diff --git a/WebModules.h b/WebModules.h index 2f4465db..b4ffc8ba 100644 --- a/WebModules.h +++ b/WebModules.h @@ -117,7 +117,7 @@ public: virtual ~CWebSock(); virtual bool ForceLogin(); - virtual bool OnLogin(const CString& sUser, const CString& sPass); + virtual void OnLogin(const CString& sUser, const CString& sPass); virtual void OnPageRequest(const CString& sURI); void ParsePath(); // This parses the path portion of the url into some member vars