Search code examples
line-breaksirc

Insert line breaks into an IRC message


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?


Solution

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