kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
181 stars 64 forks source link

client.reply(str), where str is all white space, does not emit a PRIVMSG event with white space. #258

Open adedomin opened 4 years ago

adedomin commented 4 years ago

When attempting to write nothing but whitespace, the sendMessage prototype fails to emit a PRIVMSG for it.

I'm guessing it has to do with the lineBreak generator which I haven't fully debugged or grokked yet.

This problem didn't exist in v2.9.1.

Maybe helpful picture of debugging: Screenshot from 2020-07-30 18-42-55

xPaw commented 4 years ago

From a quick look at the code, it could possibly be caused by this:

https://github.com/kiwiirc/irc-framework/blob/cfc5cf6c6504be7d3468901d26905d3349794f52/src/linebreak.js#L180-L184