node-irc icon indicating copy to clipboard operation
node-irc copied to clipboard

New line character goes into separate message

Open acagastya opened this issue 5 years ago • 3 comments

Hi, I have noticed a new-line character in the message separates into two messages. Is that an expected behaviour. If so, how can one send a single message with a line-break in it?

acagastya avatar Nov 13 '20 06:11 acagastya

Yes, it's an expected behavior. CR &/or LF are perceived as message-ending characters from the IRC protocol (see here). So no, we can't send multiline messages. 😕

memoric avatar Jan 04 '21 13:01 memoric

Okay, @memoric. The problem I am facing is this: I have a msg which may contain line breaks and I need to send the message in red colour. So, I am doing resp = ircColor.red(msg). But due to the line break, not everything is in the same colour. This would mean, I should probably ask about this with the maintainers of irc-colour, right?

(You can close this issue)

acagastya avatar Jan 06 '21 07:01 acagastya

TypeError: args[(args.length - 1)].match is not a function

sorry to bump this but I am working with your wrapper and encountered this issue.

this happens when I return an openweather API search query. the JSON comes back formatted properly but it has to send in more than 1 message as an array so I've used \n to break it up resulting in the above error.

Any feedback is appreciated thank you.

calmsleeper avatar Dec 21 '21 06:12 calmsleeper