mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 03:04:05 +01:00
relay: whitelist _ on InspIRCd, UnrealIRCd, Nefarious, clientbot
This commit is contained in:
parent
ef8ec03e41
commit
c09fce344d
@ -182,6 +182,10 @@ def normalize_host(irc, host):
|
|||||||
# UnrealIRCd and IRCd-Hybrid don't allow slashes in hostnames
|
# UnrealIRCd and IRCd-Hybrid don't allow slashes in hostnames
|
||||||
allowed_chars += '/'
|
allowed_chars += '/'
|
||||||
|
|
||||||
|
if irc.protoname in ('inspircd', 'clientbot', 'nefarious', 'unreal'):
|
||||||
|
# The above IRCds allow _ in hostnames, while TS6-like IRCds do not.
|
||||||
|
allowed_chars += '_'
|
||||||
|
|
||||||
for char in host:
|
for char in host:
|
||||||
if char not in allowed_chars:
|
if char not in allowed_chars:
|
||||||
host = host.replace(char, '-')
|
host = host.replace(char, '-')
|
||||||
|
Loading…
Reference in New Issue
Block a user