From 1bc555d66c34bda10e54d5ce8228cad793a569fa Mon Sep 17 00:00:00 2001 From: Thor77 Date: Thu, 30 Mar 2017 20:10:08 +0200 Subject: [PATCH] Add IdentMap-lookup for new clients added to clients-collection during log-parsing Fix #18 --- tsstats/log.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tsstats/log.py b/tsstats/log.py index 5ddb462..5196f32 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -145,7 +145,9 @@ def _parse_details(log_path, ident_map=None, clients=None, online_dc=True): logger.debug('Not supported client action: "%s"', message) continue nick, clid = match.group('nick'), match.group('clid') - client = clients.setdefault(clid, Client(clid, nick)) + client = clients.setdefault( + clid, Client(clients.ident_map.get(clid, clid), nick) + ) # set current nick client.nick = nick # add nick to history