mirror of
https://github.com/znc/znc.git
synced 2026-07-03 16:31:49 +02:00
Correctly handle large CAP lists from the IRCd
As DarthGandalf noticed, the spec asks for an "*" to be prepended if the reply needs to be split up into multiple lines. It doesn't really matter for the current code, but let's make this future-proof. :) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2041 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+10
-1
@@ -645,7 +645,16 @@ void CIRCSock::ReadLine(const CString& sData) {
|
||||
// CAP spec don't mention this, but all implementations
|
||||
// I've seen add this extra asterisk
|
||||
CString sSubCmd = sRest.Token(1);
|
||||
CString sArgs = sRest.Token(2, true).TrimPrefix_n(":");
|
||||
|
||||
// If the caplist of a reply is too long, it's split
|
||||
// into multiple replies. A "*" is prepended to show
|
||||
// that the list was split into multiple replies.
|
||||
CString sArgs;
|
||||
if (sRest.Token(2) == "*") {
|
||||
sArgs = sRest.Token(3, true).TrimPrefix_n(":");
|
||||
} else {
|
||||
sArgs = sRest.Token(2, true).TrimPrefix_n(":");
|
||||
}
|
||||
|
||||
if (sSubCmd == "LS" && !m_bAuthed) {
|
||||
VCString vsTokens;
|
||||
|
||||
Reference in New Issue
Block a user