--- a/log_line.py Wed Feb 11 03:04:35 2009 +0200
+++ b/log_line.py Wed Feb 11 03:05:11 2009 +0200
@@ -81,6 +81,14 @@
# we (<source>) changed nickname to <target>
('SELF_NICK', 0x52),
+
+ ## slightly weirder bits
+ # netsplit between <source_hostname> and <target_hostname>, <data> is a space-separated list of <chanflags><nickname>s affected
+ # the last item in the list of nicknames may also be of the form "+<count>", where count is the number of additional, but hidden, nicknames affected
+ ('NETSPLIT_START', 0x61),
+
+ # netsplit over, <data> is a list of users affected, see NETSPLIT_START
+ ('NETSPLIT_END', 0x062),
]
@classmethod
@@ -95,6 +103,9 @@
for name, code in LogTypes.LIST :
setattr(LogTypes, name, code)
+# masks
+LogTypes._NETSPLIT_MASK = 0x60
+
class LogLine (object) :
"""
An event on some specific channel
@@ -157,7 +168,7 @@
'@' + host if host else ''
)
- def __str__ (self) :
+ def __unicode__ (self) :
return '\t'.join((
self.channel.name,
str(self.offset),
@@ -165,7 +176,7 @@
str(self.timestamp),
self.format_source(),
str(self.target),
- str(self.data)
+ unicode(self.data)
))
def __repr__ (self) :