3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

relay: prefix nicks starting with - (this is invalid)

This commit is contained in:
James Lu 2016-07-01 19:19:11 -07:00
parent c9b6695f90
commit 1a0983b8e9

View File

@ -111,10 +111,11 @@ def normalizeNick(irc, netname, nick, separator=None, uid=''):
separator = separator.replace('/', fallback_separator)
nick = nick.replace('/', fallback_separator)
if nick.startswith(tuple(string.digits)):
if nick.startswith(tuple(string.digits+'-')):
# On TS6 IRCds, nicks that start with 0-9 are only allowed if
# they match the UID of the originating server. Otherwise, you'll
# get nasty protocol violation SQUITs!
# Nicks starting with - are likewise not valid.
nick = '_' + nick
suffix = separator + netname