Make the irc gateway compatible with multi-line messages
This commit is contained in:
parent
018da5c0a2
commit
b8baddf694
|
@ -254,7 +254,9 @@ def sendMessage(fro = "", to = "", message = "", token = None, toIRC = True):
|
||||||
|
|
||||||
# Send the message to IRC
|
# Send the message to IRC
|
||||||
if glob.irc == True and toIRC == True:
|
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)
|
# Spam protection (ignore FokaBot)
|
||||||
if token.userID > 999:
|
if token.userID > 999:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user