use optional-nick-arg instead of explicit assignment

This commit is contained in:
Thor77 2016-05-19 15:39:36 +02:00
parent cb94560a2f
commit 55277a2c75
1 changed files with 2 additions and 4 deletions

View File

@ -34,12 +34,10 @@ def parse_logs(log_path, ident_map={}):
if data.startswith('client'):
nick, clid = re_dis_connect.findall(data)[0]
if data.startswith('client connected'):
client = clients.setdefault(clid, Client(clid))
client.nick = nick
client = clients.setdefault(clid, Client(clid, nick))
client.connect(logdatetime)
elif data.startswith('client disconnected'):
client = clients.setdefault(clid, Client(clid))
client.nick = nick
client = clients.setdefault(clid, Client(clid, nick))
client.disconnect(logdatetime)
if 'invokeruid' in data:
re_disconnect_data = re_disconnect_invoker.findall(