Skip to content

Commit e3eb9c1

Browse files
committed
Split lines on CR as well as CR/CRLF
This chases an upstream commit bce415d and fixes possible mishandling of sent commands.
1 parent 7130026 commit e3eb9c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/irc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ export class Client extends EventEmitter {
14411441
if (!text) {
14421442
return [];
14431443
}
1444-
return text.toString().split(/\r?\n/).filter((line) => line.length > 0)
1444+
return text.toString().split(/\r\n|\r|\n/).filter((line) => line.length > 0)
14451445
.map((line) => splitLongLines(line, maxLength))
14461446
.reduce((a, b) => a.concat(b), []);
14471447
}

0 commit comments

Comments
 (0)