From b8baddf6946186830e08634c7048350f685708fc Mon Sep 17 00:00:00 2001 From: goeo_ Date: Sun, 20 Aug 2017 17:10:15 +0300 Subject: [PATCH] Make the irc gateway compatible with multi-line messages --- helpers/chatHelper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/chatHelper.py b/helpers/chatHelper.py index 4a053bc..06a5de1 100644 --- a/helpers/chatHelper.py +++ b/helpers/chatHelper.py @@ -254,7 +254,9 @@ def sendMessage(fro = "", to = "", message = "", token = None, toIRC = True): # Send the message to IRC if glob.irc == True and toIRC == True: - glob.ircServer.banchoMessage(fro, to, message.encode("latin-1").decode("utf-8")) + messageSplitInLines = message.encode("latin-1").decode("utf-8").split("\n") + for line in messageSplitInLines: + glob.ircServer.banchoMessage(fro, to, line) # Spam protection (ignore FokaBot) if token.userID > 999: