From 8341667bdd4e47d0ca14089038d299fad49a365b 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. (cherry picked from commit 990f24938b765f29d0674888c5ac09f155fc5609) --- plugins/relay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 90df2d5..27f1692 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -180,8 +180,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[:64] # Limited to 64 chars