mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +01:00 
			
		
		
		
	ngircd: ignore KILLs not meant for us
ngIRCd sends QUIT after a successful KILL, so trying to remove the target twice is erroneous and will cause a crash. TODO: what happens if an external KILL is never responded to for whatever reason?
This commit is contained in:
		
							parent
							
								
									30b9f47023
								
							
						
					
					
						commit
						58558c89ae
					
				@ -309,4 +309,16 @@ class NgIRCdProtocol(IRCS2SProtocol):
 | 
			
		||||
            # Call hooks manually, because one JOIN command have multiple channels.
 | 
			
		||||
            self.call_hooks([source, command, {'channel': channel, 'users': [source], 'modes': c.modes}])
 | 
			
		||||
 | 
			
		||||
    def handle_kill(self, source, command, args):
 | 
			
		||||
        """Handles incoming KILLs."""
 | 
			
		||||
 | 
			
		||||
        # ngIRCd sends QUIT after KILL for its own clients, so we shouldn't process this by itself
 | 
			
		||||
        # unless we're the target.
 | 
			
		||||
        killed = self._get_UID(args[0])
 | 
			
		||||
        if self.is_internal_client(killed):
 | 
			
		||||
            return super().handle_kill(source, command, args)
 | 
			
		||||
        else:
 | 
			
		||||
            log.debug("(%s) Ignoring KILL to %r as it isn't meant for us; we should see a QUIT soon",
 | 
			
		||||
                      self.name, killed)
 | 
			
		||||
 | 
			
		||||
Class = NgIRCdProtocol
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user