Fix a bug if a user uses /version

/version generates a 005 server reply. We used to cache this reply in the raw
buffer and the next user who logs in then received the same 005 reply multiple
times.

We fix this by adding CBuffer::UpdateExactLine() which does nothing if the exact
same line is already in the buffer. The only place where we (currently?) use
this is the raw 005 reply.

This should fix sf bug #2817124.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1579 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-07-25 22:31:11 +00:00
parent 7c1689db7c
commit 94f64333ca
4 changed files with 19 additions and 5 deletions

View File

@@ -139,7 +139,7 @@ void CIRCSock::ReadLine(const CString& sData) {
}
case 5:
ParseISupport(sRest);
m_pUser->AddRawBuffer(":" + sServer + " " + sCmd + " ", " " + sRest);
m_pUser->UpdateExactRawBuffer(":" + sServer + " " + sCmd + " ", " " + sRest);
break;
case 2:
case 3: