errbot
errbot copied to clipboard
irc: Fix maximal message length
-
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 afterPRIVMSG
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]
@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.
@zoni I am sorry for pinging you again -- would you happen to find a moment to consider my reply above?
Thanks a ton!
@mrshu Sorry for the delay! I'm following up on your comments!