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
This commit is contained in:
silverleo
2008-12-31 13:49:29 +00:00
parent d84b9c6e9e
commit 3538290068
+2 -2
View File
@@ -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");
}