mirror of
https://github.com/solero/houdini.git
synced 2024-11-28 08:27:18 +00:00
Check user is in a room before flushing their overdose key
This commit is contained in:
parent
d805de1dfb
commit
d862af504d
@ -47,7 +47,7 @@ async def handle_overdose_key(p, room: Room):
|
|||||||
@handlers.disconnected
|
@handlers.disconnected
|
||||||
@handlers.player_attribute(joined_world=True)
|
@handlers.player_attribute(joined_world=True)
|
||||||
async def disconnect_overdose_key(p):
|
async def disconnect_overdose_key(p):
|
||||||
if p.room.game:
|
if p.room is not None and p.room.game:
|
||||||
overdose_key = f'{p.id}.overdose'
|
overdose_key = f'{p.id}.overdose'
|
||||||
await p.server.redis.delete(overdose_key)
|
await p.server.redis.delete(overdose_key)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user