From 3538290068e7bab90f036312374ce144eaf1f92f Mon Sep 17 00:00:00 2001 From: silverleo Date: Wed, 31 Dec 2008 13:49:29 +0000 Subject: [PATCH] Show client IP in debug when username is not available. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1315 726aef4b-f618-498e-8847-2d620e286838 --- Client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client.cpp b/Client.cpp index 7bf5b73f..de7148d4 100644 --- a/Client.cpp +++ b/Client.cpp @@ -67,7 +67,7 @@ void CClient::ReadLine(const CString& sData) { sLine.RightChomp(); } - DEBUG_ONLY(cout << "(" << ((m_pUser) ? m_pUser->GetUserName() : CString("")) << ") CLI -> ZNC [" << sLine << "]" << endl); + DEBUG_ONLY(cout << "(" << ((m_pUser) ? m_pUser->GetUserName() : GetRemoteIP()) << ") CLI -> ZNC [" << sLine << "]" << endl); #ifdef _MODULES if (IsAttached()) { @@ -729,7 +729,7 @@ void CClient::PutIRC(const CString& sLine) { } void CClient::PutClient(const CString& sLine) { - DEBUG_ONLY(cout << "(" << ((m_pUser) ? m_pUser->GetUserName() : CString("")) << ") ZNC -> CLI [" << sLine << "]" << endl); + DEBUG_ONLY(cout << "(" << ((m_pUser) ? m_pUser->GetUserName() : GetRemoteIP()) << ") ZNC -> CLI [" << sLine << "]" << endl); Write(sLine + "\r\n"); }