fix: multi-line message, fixed #103

This commit is contained in:
Terry Geng
2020-03-16 09:27:37 +08:00
parent 8013789360
commit 4423f499e6

View File

@ -77,7 +77,8 @@ def send_multi_lines(bot, lines, text, linebreak="<br />"):
for newline in lines:
msg += br
br = linebreak
if (len(msg) + len(newline)) > (bot.mumble.get_max_message_length() - 4) != 0: # 4 == len("<br>")
if bot.mumble.get_max_message_length()\
and (len(msg) + len(newline)) > (bot.mumble.get_max_message_length() - 4): # 4 == len("<br>")
bot.send_msg(msg, text)
msg = ""
msg += newline