Add IdentMap-lookup for new clients

added to clients-collection during log-parsing

Fix #18
This commit is contained in:
Thor77 2017-03-30 20:10:08 +02:00
parent 683f9b984a
commit 1bc555d66c
1 changed files with 3 additions and 1 deletions

View File

@ -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) logger.debug('Not supported client action: "%s"', message)
continue continue
nick, clid = match.group('nick'), match.group('clid') 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 # set current nick
client.nick = nick client.nick = nick
# add nick to history # add nick to history