Insert line breaks into an IRC message
Asked Answered
W

1

17

I'm trying to programmatically send IRC messages with the PRIVMSG command. IRC uses CRLF to delimit separate commands, so "enter" is the end of each command.

I want to send a single message with line breaks in it so that the recipient (a human IRC user) sees a response with breaks. Is this possible? Can I use some other line break character? Should I just split the message at linebreaks and send them as multiple messages?

Wilmington answered 16/12, 2012 at 4:22 Comment(0)
L
28

IRC protocol does not allow CR and/or LF in its message, except for CRLF at the end. See RFC 1459 for detail.

Laomedon answered 16/12, 2012 at 4:36 Comment(3)
So the only way to send a true multiline message is by using CRLF?Lysenkoism
I think it is not possible. tools.ietf.org/html/rfc1459#section-8 recognition that any LF or CR anywhere in a message marks the end of that message (instead of requiring CR-LF);Research
IRC v3 includes multiline message as far as August 2021 it is still a work-in-progress specification.Broderickbrodeur

© 2022 - 2024 — McMap. All rights reserved.