From 4ee565591f4e4bd278336ca182c1b516236829cf Mon Sep 17 00:00:00 2001 From: Cerapter Date: Fri, 24 Aug 2018 12:58:59 +0200 Subject: [PATCH] Jukebox and area locking bugfixes. --- server/area_manager.py | 2 +- server/client_manager.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/area_manager.py b/server/area_manager.py index 90229d0..372195b 100644 --- a/server/area_manager.py +++ b/server/area_manager.py @@ -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 diff --git a/server/client_manager.py b/server/client_manager.py index 62e141d..709e0d8 100644 --- a/server/client_manager.py +++ b/server/client_manager.py @@ -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)