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?

Superbest
  • 25,318
  • 14
  • 62
  • 134

1 Answers1

28

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

Community
  • 1
  • 1
yasu
  • 1,374
  • 8
  • 16
  • So the only way to send a true multiline message is by using CRLF? – CMCDragonkai Mar 06 '17 at 09:53
  • 1
    I think it is not possible. https://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);` – xoryves May 10 '19 at 09:04
  • 1
    IRC v3 includes [multiline message](https://ircv3.net/specs/extensions/multiline) as far as August 2021 it is still a work-in-progress specification. – marcz Aug 26 '21 at 17:07