mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +01:00 
			
		
		
		
	services_support: fix rejoin-on-kill to the main service bot
Clear the irc.pseudoclient state on kill as the respawning code will check for it first and reuse UIDs even if they don't exist.
This commit is contained in:
		
							parent
							
								
									847854aac3
								
							
						
					
					
						commit
						d4cbf1d2af
					
				@ -104,6 +104,8 @@ utils.add_hook(handle_endburst, 'ENDBURST')
 | 
			
		||||
def handle_kill(irc, source, command, args):
 | 
			
		||||
    """Handle KILLs to PyLink service bots, respawning them as needed."""
 | 
			
		||||
    target = args['target']
 | 
			
		||||
    if irc.pseudoclient and target == irc.pseudoclient.uid:
 | 
			
		||||
        irc.pseudoclient = None
 | 
			
		||||
    userdata = args.get('userdata')
 | 
			
		||||
    sbot = irc.get_service_bot(target)
 | 
			
		||||
    servicename = None
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user