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

relay: only look up nick once in normalize_nick

(cherry picked from commit ec8f744449)

Conflicts:
	plugins/relay.py
This commit is contained in:
James Lu 2018-03-22 22:45:40 -07:00
parent 78b515144f
commit c54bb557dd

View File

@ -157,7 +157,7 @@ def normalize_nick(irc, netname, nick, times_tagged=0, uid=''):
if char not in allowed_chars:
nick = nick.replace(char, fallback_separator)
while irc.nickToUid(nick) and irc.nickToUid(nick) != uid:
while irc.nickToUid(nick) not in (None, uid):
# The nick we want exists: Increase the separator length by 1 if the user was already
# tagged, but couldn't be created due to a nick conflict. This can happen when someone
# steals a relay user's nick.