diff --git a/src/callbacks.py b/src/callbacks.py index e198b54a6..4a109f3bf 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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