Jukebox and area locking bugfixes.
This commit is contained in:
		
							parent
							
								
									9ce2ec9de2
								
							
						
					
					
						commit
						4ee565591f
					
				@ -205,7 +205,7 @@ class AreaManager:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        def can_send_message(self, client):
 | 
			
		||||
            if self.is_locked and not client.is_mod and not client.ipid in self.invite_list:
 | 
			
		||||
            if self.is_locked and not client.is_mod and not client.id in self.invite_list:
 | 
			
		||||
                client.send_host_message('This is a locked area - ask the CM to speak.')
 | 
			
		||||
                return False
 | 
			
		||||
            return (time.time() * 1000.0 - self.next_message_time) > 0
 | 
			
		||||
 | 
			
		||||
@ -106,8 +106,6 @@ class ClientManager:
 | 
			
		||||
            return True
 | 
			
		||||
            
 | 
			
		||||
        def disconnect(self):
 | 
			
		||||
            if self.area.jukebox:
 | 
			
		||||
                self.area.remove_jukebox_vote(self, True)
 | 
			
		||||
            self.transport.close()
 | 
			
		||||
 | 
			
		||||
        def change_character(self, char_id, force=False):
 | 
			
		||||
@ -337,6 +335,8 @@ class ClientManager:
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
    def remove_client(self, client):
 | 
			
		||||
        if client.area.jukebox:
 | 
			
		||||
            client.area.remove_jukebox_vote(client, True)
 | 
			
		||||
        heappush(self.cur_id, client.id)
 | 
			
		||||
        self.clients.remove(client)
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user