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

The length of the sent messages is limited and does not change in the settings!

Open Phazeus opened this issue 3 years ago • 3 comments

When sending a message whose length exceeds about 250 characters (I didn't count exactly, but the messages are short), the message is cut off. The messageSplit:2048 parameter does not help, the behavior does not change. What can be done? (Server allow to send long messages)

Phazeus avatar Jul 20 '22 13:07 Phazeus

I think it cuts off at around 440 chars. I had problems with this when there's emojis involved. I think emojis are not being counted correctly. And some parts get cut. So I'm splitting messages myself with:

      if (message.length > 400) {
        let lines = message.match(/.{1,250}/g)

        for (let line of lines) {
          App.irc_client.say(channel, line)
        }
      }

This splits the message into smaller 250 length chunks.

madprops avatar Apr 13 '23 10:04 madprops

Also just discovered this: https://morioh.com/p/f65839a85d1d

madprops avatar Apr 13 '23 10:04 madprops

https://github.com/matrix-org/node-irc

madprops avatar Apr 13 '23 10:04 madprops