mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-18 08:02:51 +01:00
relay: convert / to . in hostnames on hybrid
Also, switch this check to a whitelist instead of a blacklist for better compatibility.
This commit is contained in:
parent
c40895e221
commit
990f24938b
@ -184,8 +184,8 @@ def normalizeNick(irc, netname, nick, times_tagged=0, uid=''):
|
|||||||
def normalizeHost(irc, host):
|
def normalizeHost(irc, host):
|
||||||
"""Creates a normalized hostname for the given host suitable for
|
"""Creates a normalized hostname for the given host suitable for
|
||||||
introduction to a remote network (as a relay client)."""
|
introduction to a remote network (as a relay client)."""
|
||||||
if irc.protoname == 'unreal':
|
if irc.protoname not in ('inspircd', 'ts6', 'clientbot', 'nefarious'):
|
||||||
# UnrealIRCd doesn't allow slashes in hostnames
|
# UnrealIRCd and IRCd-Hybrid don't allow slashes in hostnames
|
||||||
host = host.replace('/', '.')
|
host = host.replace('/', '.')
|
||||||
return host[:63] # Limit hosts to 63 chars for best compatibility
|
return host[:63] # Limit hosts to 63 chars for best compatibility
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user