diff options
-rw-r--r-- | CAO_Client.py | 4 | ||||
-rwxr-xr-x | server.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CAO_Client.py b/CAO_Client.py index b9da42a..bdcc000 100644 --- a/CAO_Client.py +++ b/CAO_Client.py @@ -61,3 +61,7 @@ class CAO_Client(): def send_notification(self, message): self.socket.send_message(self.handler, message) + + def disconnect(self): + if self.player is not None: + self.player.client = None @@ -13,7 +13,7 @@ def new_client_handler(client, server): client['cao_client'] = CAO_Client.CAO_Client(server, client, game_manager) def client_left_handler(client, server): - pass + client['cao_client'].disconnect(); def message_received_handler(client, server, message): try: |