From 83dc2d9bd3f7862f4befd61a0fb4001b261745ce Mon Sep 17 00:00:00 2001 From: psychon Date: Sun, 21 Sep 2008 12:54:10 +0000 Subject: [PATCH] Set the client's nick name to our IRC nick when it connects to ZNC The assumption here is that clients parse raw 001 to get their actual nick. This worked before because nothing relied on CClient's idea of the users' nick. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1214 726aef4b-f618-498e-8847-2d620e286838 --- User.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/User.cpp b/User.cpp index 2a83e542..244afb8a 100644 --- a/User.cpp +++ b/User.cpp @@ -211,6 +211,9 @@ void CUser::UserConnected(CClient* pClient) { while (m_RawBuffer.GetLine(GetIRCNick().GetNick(), sLine, uIdx++)) { pClient->PutClient(sLine); } + + // The assumption is that the client got this nick from the 001 reply + pClient->SetNick(GetIRCNick().GetNick()); } // Send the cached MOTD