Skip to content

Commit

Permalink
Add status.client_hash(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu committed Dec 5, 2023
1 parent 6f1fd06 commit b7881d1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cache/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ def get(player_id: int) -> Optional[bStatusUpdate]:
text=status[b'text'].decode(),
)

def client_hash(player_id: int) -> Optional[str]:
hash = app.session.redis.hget(
f'bancho:status:{player_id}',
'hash'
)

if not hash:
return

return hash.decode()

def delete(player_id: int) -> None:
app.session.redis.hdel(
f'bancho:status:{player_id}',
Expand Down

0 comments on commit b7881d1

Please sign in to comment.