mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fix bytes count in message splitting.
This commit is contained in:
parent
876af3dfd5
commit
d9a01629cd
@ -906,7 +906,9 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
||||
log.warning('Truncating to %s bytes from %s bytes.',
|
||||
maximumLength, len(s))
|
||||
s = s[:maximumLength]
|
||||
if len(s) < allowedLength or \
|
||||
s_too_long = len(s.encode()) < allowedLength \
|
||||
if minisix.PY3 else len(s) < allowedLength
|
||||
if s_too_long or \
|
||||
not conf.get(conf.supybot.reply.mores, target):
|
||||
# In case we're truncating, we add 20 to allowedLength,
|
||||
# because our allowedLength is shortened for the
|
||||
|
Loading…
Reference in New Issue
Block a user