use optional-nick-arg instead of explicit assignment
This commit is contained in:
parent
cb94560a2f
commit
55277a2c75
|
@ -34,12 +34,10 @@ def parse_logs(log_path, ident_map={}):
|
||||||
if data.startswith('client'):
|
if data.startswith('client'):
|
||||||
nick, clid = re_dis_connect.findall(data)[0]
|
nick, clid = re_dis_connect.findall(data)[0]
|
||||||
if data.startswith('client connected'):
|
if data.startswith('client connected'):
|
||||||
client = clients.setdefault(clid, Client(clid))
|
client = clients.setdefault(clid, Client(clid, nick))
|
||||||
client.nick = nick
|
|
||||||
client.connect(logdatetime)
|
client.connect(logdatetime)
|
||||||
elif data.startswith('client disconnected'):
|
elif data.startswith('client disconnected'):
|
||||||
client = clients.setdefault(clid, Client(clid))
|
client = clients.setdefault(clid, Client(clid, nick))
|
||||||
client.nick = nick
|
|
||||||
client.disconnect(logdatetime)
|
client.disconnect(logdatetime)
|
||||||
if 'invokeruid' in data:
|
if 'invokeruid' in data:
|
||||||
re_disconnect_data = re_disconnect_invoker.findall(
|
re_disconnect_data = re_disconnect_invoker.findall(
|
||||||
|
|
Loading…
Reference in New Issue