mirror of
https://github.com/solero/houdini.git
synced 2024-11-09 20:58:20 +00:00
Send error if room is full
This commit is contained in:
parent
08c97b24b1
commit
0d8c79c18d
@ -26,6 +26,9 @@ class RoomMixin:
|
|||||||
self.waddles = {}
|
self.waddles = {}
|
||||||
|
|
||||||
async def add_penguin(self, p):
|
async def add_penguin(self, p):
|
||||||
|
if len(self.penguins_by_id) >= self.max_users and not p.moderator:
|
||||||
|
return await p.send_error(210)
|
||||||
|
|
||||||
if p.room:
|
if p.room:
|
||||||
await p.room.remove_penguin(p)
|
await p.room.remove_penguin(p)
|
||||||
self.penguins_by_id[p.id] = p
|
self.penguins_by_id[p.id] = p
|
||||||
|
Loading…
Reference in New Issue
Block a user