mirror of
https://github.com/solero/houdini.git
synced 2024-11-10 05:08:19 +00:00
Move room removal to penguin class
This commit is contained in:
parent
0b9b16d638
commit
0bc4bdd8fe
@ -293,6 +293,9 @@ class Penguin(Spheniscidae):
|
||||
self.data.username))
|
||||
|
||||
async def _client_connected(self):
|
||||
if self.room is not None:
|
||||
return await self.room.remove_penguin(self)
|
||||
|
||||
await super()._client_connected()
|
||||
|
||||
def __repr__(self):
|
||||
|
@ -133,9 +133,6 @@ class Spheniscidae:
|
||||
self.logger.info('Client %s connected', self.peer_name)
|
||||
|
||||
async def _client_disconnected(self):
|
||||
if self.room is not None:
|
||||
return await self.room.remove_penguin(self)
|
||||
|
||||
del self.server.peers_by_ip[self.peer_name]
|
||||
self.logger.info('Client %s disconnected', self.peer_name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user