diff --git a/Client.cpp b/Client.cpp index 3641d830..02a0b096 100644 --- a/Client.cpp +++ b/Client.cpp @@ -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).