3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

core: use the most recent UID if we have an unresolved nick collision / desync

This is the one most likely to be correct, assuming IRCds deals with nick collisions properly on their own.
This commit is contained in:
James Lu 2018-05-12 16:01:16 -07:00
parent 73322bd9ba
commit f87e646f35

View File

@ -613,9 +613,9 @@ class PyLinkNetworkCore(structures.CamelCaseToSnakeCase):
uids = self.users.bynick.get(nick, [])
if len(uids) > 1:
log.warning('(%s) Multiple UIDs found for nick %r: %r', self.name, nick, uids)
log.warning('(%s) Multiple UIDs found for nick %r: %r; using the last one!', self.name, nick, uids)
try:
return uids[0]
return uids[-1]
except IndexError:
return None