Skip to content

Commit 37cb805

Browse files
committed
Remove newlines (except trailing ones) from _send() payloads
1 parent 1af3a04 commit 37cb805

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/irc.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1536,8 +1536,10 @@ export class Client extends (EventEmitter as unknown as new () => TypedEmitter<C
15361536
if (this.requestedDisconnect) {
15371537
return;
15381538
}
1539+
1540+
const msg = args.join(' ').replace(/\r|\n/g, "");
15391541
this.state.lastSendTime = Date.now();
1540-
this.conn.write(args.join(' ') + '\r\n');
1542+
this.conn.write(msg + '\r\n');
15411543
}
15421544

15431545
public join(channel: string, callback?: (...args: unknown[]) => void) {

0 commit comments

Comments
 (0)