mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +01:00 
			
		
		
		
	protocols: Channel.removeuser -> Channel.remove_user
This commit is contained in:
		
							parent
							
								
									7d68c03101
								
							
						
					
					
						commit
						b81a03fda9
					
				@ -259,7 +259,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
 | 
			
		||||
 | 
			
		||||
    def part(self, source, channel, reason=''):
 | 
			
		||||
        """STUB: Parts a user from a channel."""
 | 
			
		||||
        self.channels[channel].removeuser(source)
 | 
			
		||||
        self.channels[channel].remove_user(source)
 | 
			
		||||
        self.users[source].channels.discard(channel)
 | 
			
		||||
 | 
			
		||||
        # Only parts for the main PyLink client are actually forwarded. Others are ignored.
 | 
			
		||||
@ -818,7 +818,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
 | 
			
		||||
                del self.kick_queue[channel]
 | 
			
		||||
 | 
			
		||||
        # Statekeeping: remove the target from the channel they were previously in.
 | 
			
		||||
        self.channels[channel].removeuser(target)
 | 
			
		||||
        self.channels[channel].remove_user(target)
 | 
			
		||||
        try:
 | 
			
		||||
            self.users[target].channels.remove(channel)
 | 
			
		||||
        except KeyError:
 | 
			
		||||
@ -907,7 +907,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
 | 
			
		||||
            reason = ''
 | 
			
		||||
 | 
			
		||||
        for channel in channels:
 | 
			
		||||
            self.channels[channel].removeuser(source)
 | 
			
		||||
            self.channels[channel].remove_user(source)
 | 
			
		||||
        self.users[source].channels -= set(channels)
 | 
			
		||||
 | 
			
		||||
        self.call_hooks([source, 'PART', {'channels': channels, 'text': reason}])
 | 
			
		||||
 | 
			
		||||
@ -292,7 +292,7 @@ class IRCS2SProtocol(IRCCommonProtocol):
 | 
			
		||||
        channels = self.to_lower(args[0]).split(',')
 | 
			
		||||
 | 
			
		||||
        for channel in channels:
 | 
			
		||||
            self.channels[channel].removeuser(source)
 | 
			
		||||
            self.channels[channel].remove_user(source)
 | 
			
		||||
            try:
 | 
			
		||||
                self.users[source].channels.discard(channel)
 | 
			
		||||
            except KeyError:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user