mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Remove CZNC::GetUser()
CZNC::FindUser() does the same thing and we don't need two of these. GetUser() was removed because FindUser() is used more than GetUser(). Thanks to Sthebig for noticing this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2046 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -409,12 +409,6 @@ void CZNC::DeleteUsers() {
|
||||
DisableConnectUser();
|
||||
}
|
||||
|
||||
CUser* CZNC::GetUser(const CString& sUser) {
|
||||
// Todo: make this case insensitive
|
||||
map<CString,CUser*>::iterator it = m_msUsers.find(sUser);
|
||||
return (it == m_msUsers.end()) ? NULL : it->second;
|
||||
}
|
||||
|
||||
Csock* CZNC::FindSockByName(const CString& sSockName) {
|
||||
return m_Manager.FindSockByName(sSockName);
|
||||
}
|
||||
@@ -1959,7 +1953,7 @@ void CZNC::AuthUser(CSmartPtr<CAuthBase> AuthClass) {
|
||||
return;
|
||||
}
|
||||
|
||||
CUser* pUser = GetUser(AuthClass->GetUsername());
|
||||
CUser* pUser = FindUser(AuthClass->GetUsername());
|
||||
|
||||
if (!pUser || !pUser->CheckPass(AuthClass->GetPassword())) {
|
||||
AuthClass->RefuseLogin("Invalid Password");
|
||||
|
||||
Reference in New Issue
Block a user