errbot icon indicating copy to clipboard operation
errbot copied to clipboard

irc: Fix maximal message length

Open mrshu opened this issue 6 years ago • 3 comments

  • The maximal message length has previously been set to 510 (probably in order to accomodate the b'\r\n' that are necessary for each IRC message). This turns out not to be enough, as the message starts with the obligatory PRIVMSG <to> : and ends with the EXT (b'\x03) mark.

  • The size limit was therefore set to 499 in order to accomodate all these obligatory parts.

  • Furthermore, a new configuration option has been added (MESSAGE_SIZE_LIMIT_INCLUDES_ADDRESEE), which takes care of the fact that <to> -- the addressee of the message -- comes directly after PRIVMSG and is thus part of the message. Note that this is currently only applied in the case of IRC.

  • Fixes #989

Signed-off-by: mr.Shu [email protected]

mrshu avatar Jul 09 '17 11:07 mrshu

@gbin @zoni just a quick comment on the failed Travis test -- it seems to be related to flows and not really to the changes introduced in this PR.

With regards to this PR, I am happy to add some tests, although I did not find one for the IRC backend in the core repo.

mrshu avatar Jul 09 '17 11:07 mrshu

@zoni I am sorry for pinging you again -- would you happen to find a moment to consider my reply above?

Thanks a ton!

mrshu avatar Mar 12 '18 11:03 mrshu

@mrshu Sorry for the delay! I'm following up on your comments!

GenPage avatar Oct 19 '18 15:10 GenPage