diff --git a/efnet-irclogger-convert.py b/efnet-irclogger-convert.py index 4010129..0cfe94e 100644 --- a/efnet-irclogger-convert.py +++ b/efnet-irclogger-convert.py @@ -68,7 +68,7 @@ with open(filename, 'rb') as fp: sys.stdout.buffer.write(f'{ts} QUIT '.encode('ascii') + words[0] + b' quits' + reason + b'\n') elif words[0] == b'Quits:' and words[3][0:1] == b'(' and words[-1][-1:] == b')': reason = (b' [' + b' '.join(words[3:])[1:-1] + b']') if len(words) > 4 or words[3] != b'()' else b'' - sys.stdout.buffer.write(f'{ts} QUIT '.encode('ascii') + words[0] + b' quits' + reason + b'\n') + sys.stdout.buffer.write(f'{ts} QUIT '.encode('ascii') + words[1] + b' quits' + reason + b'\n') # KICK elif words[1:4] == [b'was', b'kicked', b'by'] and words[5][0:1] == b'(' and words[-1][-1:] == b')': sys.stdout.buffer.write(f'{ts} KICK '.encode('ascii') + words[0] + b' is kicked by ' + words[4] + b' [' + b' '.join(words[5:])[1:-1] + b']' + b'\n')