# HG changeset patch # User Charly COSTE # Date 1250453922 -7200 # Node ID 4b2faa511f01b610e71fb50c90acaaf036490df1 # Parent 1463f4620fcadc8f3e1eca4d7e0619ce1c8669dc Fixed multi-line message bug Signed-off-by: Charly COSTE diff --git a/irclib.py b/irclib.py --- a/irclib.py +++ b/irclib.py @@ -764,12 +764,14 @@ class ServerConnection(Connection): def privmsg(self, target, text): """Send a PRIVMSG command.""" # Should limit len(text) here! - self.send_raw("PRIVMSG %s :%s" % (target, text)) + for l in text.split('\n'): + self.send_raw("PRIVMSG %s :%s" % (target, l)) def privmsg_many(self, targets, text): """Send a PRIVMSG command to multiple targets.""" # Should limit len(text) here! - self.send_raw("PRIVMSG %s :%s" % (",".join(targets), text)) + for l in text.split('\n'): + self.send_raw("PRIVMSG %s :%s" % (",".join(targets), l)) def quit(self, message=""): """Send a QUIT command."""