mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +01:00 
			
		
		
		
	relay: normalize channel case in 'link'
(regression from commit 93c9b6289c50ebc89043c866d06eb0d360ea6102) Reported by @koaxirc.
This commit is contained in:
		
							parent
							
								
									b23a887edd
								
							
						
					
					
						commit
						ebd5b77576
					
				@ -1707,10 +1707,12 @@ def link(irc, source, args):
 | 
			
		||||
    network is alive, and link the channel anyways."""
 | 
			
		||||
    args = link_parser.parse_args(args)
 | 
			
		||||
 | 
			
		||||
    # Normalize channel case
 | 
			
		||||
    channel = irc.toLower(args.channel)
 | 
			
		||||
    localchan = irc.toLower(args.localchannel or args.channel)
 | 
			
		||||
    remotenet = args.remotenet
 | 
			
		||||
 | 
			
		||||
    for c in (args.channel, localchan):
 | 
			
		||||
    for c in (channel, localchan):
 | 
			
		||||
        if not utils.isChannel(c):
 | 
			
		||||
            irc.error('Invalid channel %r.' % c)
 | 
			
		||||
            return
 | 
			
		||||
@ -1750,7 +1752,7 @@ def link(irc, source, args):
 | 
			
		||||
 | 
			
		||||
    try:
 | 
			
		||||
        with db_lock:
 | 
			
		||||
            entry = db[(remotenet, args.channel)]
 | 
			
		||||
            entry = db[(remotenet, channel)]
 | 
			
		||||
    except KeyError:
 | 
			
		||||
        irc.error('No such relay %r exists.' % args.channel)
 | 
			
		||||
        return
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user