From ec8f74444906347dda3329c929f2c7315a1da507 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 22 Mar 2018 22:45:40 -0700 Subject: [PATCH] relay: only look up nick once in normalize_nick --- plugins/relay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index b6f27db..a35b16c 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -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.