mirror of
https://github.com/znc/znc.git
synced 2026-05-07 05:44:41 +02:00
CAuthBase: Use a Csock* instead of a CString "sRemoteIP"
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1511 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+7
-1
@@ -620,7 +620,7 @@ void CClient::AuthUser() {
|
||||
}
|
||||
|
||||
CClientAuth::CClientAuth(CClient* pClient, const CString& sUsername, const CString& sPassword)
|
||||
: CAuthBase(sUsername, sPassword, pClient->GetRemoteIP()) {
|
||||
: CAuthBase(sUsername, sPassword, pClient) {
|
||||
m_pClient = pClient;
|
||||
}
|
||||
|
||||
@@ -630,6 +630,12 @@ void CClientAuth::RefusedLogin(const CString& sReason) {
|
||||
}
|
||||
}
|
||||
|
||||
CString CAuthBase::GetRemoteIP() const {
|
||||
if (m_pSock)
|
||||
return m_pSock->GetRemoteIP();
|
||||
return "";
|
||||
}
|
||||
|
||||
void CAuthBase::RefuseLogin(const CString& sReason) {
|
||||
CUser* pUser = CZNC::Get().GetUser(GetUsername());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user