mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Call OnFailedLogin() for all failed logins, not only those on the irc port
This breaks CAuthBase's API for modules that want to auth users. Instead of overloading AcceptLogin() and RefuseLogin(), they now have to overload AcceptedLogin() and RefusedLogin(). Modules that auth users (e.g. imapauth) still call AcceptLogin() and RefuseLogin() which is where OnFailedLogin() gets called. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1389 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -26,8 +26,8 @@ public:
|
||||
virtual ~CWebAdminAuth() {}
|
||||
|
||||
void SetWebAdminSock(CWebAdminSock* pWebAdminSock) { m_pWebAdminSock = pWebAdminSock; }
|
||||
void AcceptLogin(CUser& User);
|
||||
void RefuseLogin(const CString& sReason);
|
||||
void AcceptedLogin(CUser& User);
|
||||
void RefusedLogin(const CString& sReason);
|
||||
private:
|
||||
protected:
|
||||
CWebAdminSock* m_pWebAdminSock;
|
||||
@@ -1165,7 +1165,7 @@ CWebAdminAuth::CWebAdminAuth(CWebAdminSock* pWebAdminSock, const CString& sUsern
|
||||
m_pWebAdminSock = pWebAdminSock;
|
||||
}
|
||||
|
||||
void CWebAdminAuth::AcceptLogin(CUser& User) {
|
||||
void CWebAdminAuth::AcceptedLogin(CUser& User) {
|
||||
if (m_pWebAdminSock) {
|
||||
m_pWebAdminSock->SetSessionUser(&User);
|
||||
m_pWebAdminSock->SetLoggedIn(true);
|
||||
@@ -1173,7 +1173,7 @@ void CWebAdminAuth::AcceptLogin(CUser& User) {
|
||||
}
|
||||
}
|
||||
|
||||
void CWebAdminAuth::RefuseLogin(const CString& sReason) {
|
||||
void CWebAdminAuth::RefusedLogin(const CString& sReason) {
|
||||
if (m_pWebAdminSock) {
|
||||
m_pWebAdminSock->SetLoggedIn(false);
|
||||
m_pWebAdminSock->UnPauseRead();
|
||||
|
||||
Reference in New Issue
Block a user