diff --git a/src/ircmsgs.py b/src/ircmsgs.py index e6e7e3c55..87adae985 100644 --- a/src/ircmsgs.py +++ b/src/ircmsgs.py @@ -240,10 +240,14 @@ def toXml(msg, pretty=True, includeTime=True): if includeTime: L.append(' time="%s"' % time.time()) L.append('>') + if pretty: + L.append('\n') for arg in msg.args: if pretty: - L.append('\n ') + L.append(' ') L.append('%s' % _escape(arg)) + if pretty: + L.append('\n') L.append('') return ''.join(L)