mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +01:00 
			
		
		
		
	protocols: strip leading prefix modes before checking whether msg target is a channel
(cherry picked from commit 2c7b5669bd761672544035ccf7679db0899a6ab0)
This commit is contained in:
		
							parent
							
								
									f061a2fc68
								
							
						
					
					
						commit
						9a59c68370
					
				@ -1115,9 +1115,11 @@ class P10Protocol(IRCS2SProtocol):
 | 
			
		||||
        # <- ABAAA O AyAAA :notice text
 | 
			
		||||
        target = args[0]
 | 
			
		||||
 | 
			
		||||
        # We use lowercase channels internally, but uppercase UIDs.
 | 
			
		||||
        if utils.isChannel(target):
 | 
			
		||||
        # We use lower case channels internally, but mixed case UIDs.
 | 
			
		||||
        stripped_target = target.lstrip(''.join(self.irc.prefixmodes.values()))
 | 
			
		||||
        if utils.isChannel(stripped_target):
 | 
			
		||||
            target = self.irc.toLower(target)
 | 
			
		||||
 | 
			
		||||
        return {'target': target, 'text': args[1]}
 | 
			
		||||
 | 
			
		||||
    handle_notice = handle_privmsg
 | 
			
		||||
 | 
			
		||||
@ -357,9 +357,12 @@ class TS6BaseProtocol(IRCS2SProtocol):
 | 
			
		||||
        # <- :70MAAAAAA PRIVMSG #dev :afasfsa
 | 
			
		||||
        # <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa
 | 
			
		||||
        target = args[0]
 | 
			
		||||
 | 
			
		||||
        # We use lowercase channels internally, but uppercase UIDs.
 | 
			
		||||
        if utils.isChannel(target):
 | 
			
		||||
        stripped_target = target.lstrip(''.join(self.irc.prefixmodes.values()))
 | 
			
		||||
        if utils.isChannel(stripped_target):
 | 
			
		||||
            target = self.irc.toLower(target)
 | 
			
		||||
 | 
			
		||||
        return {'target': target, 'text': args[1]}
 | 
			
		||||
 | 
			
		||||
    handle_notice = handle_privmsg
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user