forked from Hay1tsme/artemis
[mai2/chuni/ongeki] Properly ignore guest plays (#132)
For all three games, guest plays are created using: ```python 0x1000000000001 | ((allnet_place_id & 65535) << 32) ``` Reviewed-on: Hay1tsme/artemis#132 Co-authored-by: beerpsi <beerpsi@duck.com> Co-committed-by: beerpsi <beerpsi@duck.com>
This commit is contained in:
@ -811,6 +811,12 @@ class ChuniBase:
|
||||
upsert = data["upsertUserAll"]
|
||||
user_id = data["userId"]
|
||||
|
||||
if int(user_id) & 0x1000000000001 == 0x1000000000001:
|
||||
place_id = int(user_id) & 0xFFFC00000000
|
||||
|
||||
self.logger.info("Guest play from place ID %d, ignoring.", place_id)
|
||||
return {"returnCode": "1"}
|
||||
|
||||
if "userData" in upsert:
|
||||
try:
|
||||
upsert["userData"][0]["userName"] = self.read_wtf8(
|
||||
|
Reference in New Issue
Block a user