From d66698e9938d820b34295d2c07007bb3e6321abf Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 7 Mar 2009 12:44:11 +0000 Subject: [PATCH] Fix my previous commit and also display the remote IP for the failed login git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1416 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client.cpp b/Client.cpp index a514099d..6d315d88 100644 --- a/Client.cpp +++ b/Client.cpp @@ -628,14 +628,14 @@ void CClientAuth::RefusedLogin(const CString& sReason) { } void CAuthBase::RefuseLogin(const CString& sReason) { - CUser* pUser = GetUser(GetUsername()); + 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). if (pUser) { - pUser->PutStatus("Another client attempted to login as you [" - + sReason + "]."); + pUser->PutStatus("A client from [" + GetRemoteIP() + "] attempted " + "to login as you, but was rejected [" + sReason + "]."); } #ifdef _MODULES