mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Micro optimization
Only call GetUser() when we actually need the result git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2028 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+2
-2
@@ -631,11 +631,11 @@ void CAuthBase::AcceptLogin(CUser& User) {
|
||||
}
|
||||
|
||||
void CAuthBase::RefuseLogin(const CString& sReason) {
|
||||
CUser* pUser = CZNC::Get().GetUser(GetUsername());
|
||||
|
||||
if (!m_pSock)
|
||||
return;
|
||||
|
||||
CUser* pUser = CZNC::Get().GetUser(GetUsername());
|
||||
|
||||
// If the username is valid, notify that user that someone tried to
|
||||
// login. Use sReason because there are other reasons than "wrong
|
||||
// password" for a login to be rejected (e.g. fail2ban).
|
||||
|
||||
Reference in New Issue
Block a user