Insert line breaks into an IRC message

Superbest picture Superbest · Dec 16, 2012 · Viewed 9.7k times · Source

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?

Answer

yasu picture yasu · Dec 16, 2012

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