forked from Hay1tsme/artemis
maidx: ignore guest upserts, fixes #74
This commit is contained in:
parent
c1412ca9a8
commit
26cdc6c10f
@ -238,6 +238,10 @@ class Mai2Base:
|
|||||||
user_id = data["userId"]
|
user_id = data["userId"]
|
||||||
upsert = data["upsertUserAll"]
|
upsert = data["upsertUserAll"]
|
||||||
|
|
||||||
|
if int(user_id) & 1000000000001 == 1000000000001:
|
||||||
|
self.logger.info("Guest play, ignoring.")
|
||||||
|
return {"returnCode": 1, "apiName": "UpsertUserAllApi"}
|
||||||
|
|
||||||
if "userData" in upsert and len(upsert["userData"]) > 0:
|
if "userData" in upsert and len(upsert["userData"]) > 0:
|
||||||
upsert["userData"][0].pop("accessCode")
|
upsert["userData"][0].pop("accessCode")
|
||||||
upsert["userData"][0].pop("userId")
|
upsert["userData"][0].pop("userId")
|
||||||
|
@ -97,6 +97,10 @@ class Mai2DX(Mai2Base):
|
|||||||
user_id = data["userId"]
|
user_id = data["userId"]
|
||||||
upsert = data["upsertUserAll"]
|
upsert = data["upsertUserAll"]
|
||||||
|
|
||||||
|
if int(user_id) & 1000000000001 == 1000000000001:
|
||||||
|
self.logger.info("Guest play, ignoring.")
|
||||||
|
return {"returnCode": 1, "apiName": "UpsertUserAllApi"}
|
||||||
|
|
||||||
if "userData" in upsert and len(upsert["userData"]) > 0:
|
if "userData" in upsert and len(upsert["userData"]) > 0:
|
||||||
upsert["userData"][0]["isNetMember"] = 1
|
upsert["userData"][0]["isNetMember"] = 1
|
||||||
upsert["userData"][0].pop("accessCode")
|
upsert["userData"][0].pop("accessCode")
|
||||||
|
Loading…
Reference in New Issue
Block a user