mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 21:22:36 +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:
parent
73322bd9ba
commit
f87e646f35
@ -613,9 +613,9 @@ class PyLinkNetworkCore(structures.CamelCaseToSnakeCase):
|
|||||||
|
|
||||||
uids = self.users.bynick.get(nick, [])
|
uids = self.users.bynick.get(nick, [])
|
||||||
if len(uids) > 1:
|
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:
|
try:
|
||||||
return uids[0]
|
return uids[-1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user