make LogLine.format_source slightly less misleading
authorTero Marttila <terom@fixme.fi>
Wed, 11 Feb 2009 01:00:18 +0200
changeset 91 df2a6780cdf9
parent 90 275a675712f1
child 92 74f6a0b01ddf
make LogLine.format_source slightly less misleading
log_line.py
--- a/log_line.py	Wed Feb 11 00:47:02 2009 +0200
+++ b/log_line.py	Wed Feb 11 01:00:18 2009 +0200
@@ -139,14 +139,14 @@
 
     def format_source (self) :
         """
-            Formats source as <nickname>:<chanflags>!<username>@<hostname>, omitting those parts that are missing
+            Formats source as [<chanflags>][<nickname>][!<username>][@<hostname>], omitting those parts that are missing
         """
 
         nick, user, host, flags = self.source
 
         return "%s%s%s%s" % (
+            flags if flags and flags != ' ' else '',
             nick if nick else '',
-            ':' + flags if flags else '',
             '!' + user if user else '',
             '@' + host if host else ''
         )