mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 19:24:13 +01:00
relay: only look up nick once in normalize_nick
This commit is contained in:
parent
bb1334696c
commit
ec8f744449
@ -165,7 +165,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.nick_to_uid(nick) and irc.nick_to_uid(nick) != uid:
|
||||
while irc.nick_to_uid(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.
|
||||
|
Loading…
Reference in New Issue
Block a user