Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 851
Superbest Avatar asked Dec 16 '12 04:12

Superbest


People also ask

How to add a line break in text message?

To insert a line break in a message: On the web client and Desktop App, press Enter or Shift+Enter if you are writing the message in rich-text mode. Otherwise, press Shift+Enter . On the mobile client, tap Enter .

How do I add a new line in API?

Using a <br> tag will give you a new line. Or you can use <p></p> tags to break your content into paragraphs. The raw parameter is markdown, so you need two newlines to make a new paragraph. You may need both carriage return and line feed.


1 Answers

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

like image 52
yasu Avatar answered Sep 19 '22 09:09

yasu