3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

relay: passthrough nicks in normalize_nick() on server supporting freeform-nicks

This commit is contained in:
James Lu 2019-06-23 17:48:15 -07:00
parent 30f7a77d18
commit 1852ff5774

View File

@ -149,6 +149,9 @@ def normalize_nick(irc, netname, nick, times_tagged=0, uid=''):
UID is optional for checking regular nick changes, to make sure that the sender doesn't get
marked as nick-colliding with itself.
"""
if irc.has_cap('freeform-nicks'): # ☺
return nick
is_unicode_capable = irc.casemapping in ('utf8', 'utf-8', 'rfc7700')
if USE_UNIDECODE and not is_unicode_capable:
decoded_nick = unidecode.unidecode(nick).strip()