From 1c83f59baadae49cdf9e9b24da862fd2e012e59f Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 13 Aug 2016 10:58:40 -0700 Subject: [PATCH] relay: rewrap some poorly placed comments --- plugins/relay.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index f737d63..4e0c1d1 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -158,18 +158,12 @@ def normalizeNick(irc, netname, nick, times_tagged=0, uid=''): if char not in allowed_chars: nick = nick.replace(char, fallback_separator) - # The nick we want exists? Darn, create another one then. - # 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. - - # However, if the user is changing from, say, a long, cut-off nick to another long, - # cut-off nick, we don't need to check for duplicates and tag the nick twice. - - # somecutoffnick/net would otherwise be erroneous NICK'ed to somecutoffnic//net, - # even though there would be no collision because the old and new nicks are from - # the same client. while irc.nickToUid(nick) and irc.nickToUid(nick) != 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. + # However, if the a is changing from, say, a long, cut-off nick to another long, cut-off + # nick, we would skip tagging the nick twice if they originate from the same UID. times_tagged += 1 log.debug('(%s) relay.normalizeNick: nick %r is in use; incrementing times tagged to %s.', irc.name, nick, times_tagged)