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:
psychon
2009-05-20 09:30:19 +00:00
parent d980b42b90
commit 4e31d49209
3 changed files with 14 additions and 8 deletions
+7 -1
View File
@@ -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());