Skip to content

Commit

Permalink
split multiline message into multiple irc messages (#582)
Browse files Browse the repository at this point in the history
the irc lib in use doesn't support sending multiline messages. this patch splits messages containing newline characters into multiple irc messgaes to resolve issue: #565
  • Loading branch information
grenade authored and rnevet committed Nov 13, 2017
1 parent 2ab0faf commit a6fcefb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/Notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def post_to_irc(msg, host, port, nick, ident, realname, target):
IRC_SERVER.connect(host, port, nick)
if client.is_channel(target):
IRC_SERVER.join(target)
IRC_SERVER.privmsg(target, msg)
for line in msg.splitlines():
IRC_SERVER.privmsg(target, line)


def send_notification(_msg, notify_conf):
Expand Down

0 comments on commit a6fcefb

Please sign in to comment.