From 990f24938b765f29d0674888c5ac09f155fc5609 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 7 Aug 2016 15:16:37 -0700 Subject: [PATCH] relay: convert / to . in hostnames on hybrid Also, switch this check to a whitelist instead of a blacklist for better compatibility. --- plugins/relay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 66237d7..1be7a45 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -184,8 +184,8 @@ def normalizeNick(irc, netname, nick, times_tagged=0, uid=''): def normalizeHost(irc, host): """Creates a normalized hostname for the given host suitable for introduction to a remote network (as a relay client).""" - if irc.protoname == 'unreal': - # UnrealIRCd doesn't allow slashes in hostnames + if irc.protoname not in ('inspircd', 'ts6', 'clientbot', 'nefarious'): + # UnrealIRCd and IRCd-Hybrid don't allow slashes in hostnames host = host.replace('/', '.') return host[:63] # Limit hosts to 63 chars for best compatibility