mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +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
 | 
			
		||||
        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:
 | 
			
		||||
        if char not in allowed_chars:
 | 
			
		||||
            host = host.replace(char, '-')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user