mirror of
https://github.com/solero/houdini.git
synced 2024-11-21 21:17:21 +00:00
Use class variables for RoomMixin
Caused bug where igloos weren't being created. This is required to cohere to PEP8 guidelines.
This commit is contained in:
parent
e9ca348441
commit
da69239f49
@ -11,6 +11,9 @@ def stealth_mod_filter(stealth_mod_id):
|
||||
|
||||
class RoomMixin:
|
||||
|
||||
id = None
|
||||
max_users = None
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.penguins_by_id = {}
|
||||
self.penguins_by_username = {}
|
||||
@ -22,9 +25,6 @@ class RoomMixin:
|
||||
self.tables = {}
|
||||
self.waddles = {}
|
||||
|
||||
self.id = None
|
||||
self.max_users = None
|
||||
|
||||
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)
|
||||
@ -176,8 +176,6 @@ class PenguinIglooRoom(db.Model, RoomMixin):
|
||||
super().__init__(*args, **kwargs)
|
||||
RoomMixin.__init__(self, *args, **kwargs)
|
||||
|
||||
self.max_users = 80
|
||||
|
||||
@property
|
||||
def external_id(self):
|
||||
return self.penguin_id + PenguinIglooRoom.internal_id
|
||||
|
Loading…
Reference in New Issue
Block a user