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

relay: coerse "/" to "|" in nicks if "/" isn't present in the separator

a.k.a. make J*anus* happy :)
This commit is contained in:
James Lu 2015-09-01 09:56:28 -07:00
parent c8e7b72065
commit 6d6606900e

View File

@ -40,7 +40,7 @@ def normalizeNick(irc, netname, nick, separator=None, uid=''):
orig_nick = nick
protoname = irc.proto.__name__
maxnicklen = irc.maxnicklen
if not protoname.startswith(('insp', 'unreal')):
if '/' not in separator or not protoname.startswith(('insp', 'unreal')):
# Charybdis doesn't allow / in usernames, and will SQUIT with
# a protocol violation if it sees one.
separator = separator.replace('/', '|')