forked from Hay1tsme/artemis
maidx: ignore guest upserts, fixes #74
This commit is contained in:
parent
c1412ca9a8
commit
26cdc6c10f
@ -237,6 +237,10 @@ class Mai2Base:
|
|||||||
def handle_upsert_user_all_api_request(self, data: Dict) -> Dict:
|
def handle_upsert_user_all_api_request(self, data: Dict) -> Dict:
|
||||||
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")
|
||||||
|
@ -96,6 +96,10 @@ class Mai2DX(Mai2Base):
|
|||||||
def handle_upsert_user_all_api_request(self, data: Dict) -> Dict:
|
def handle_upsert_user_all_api_request(self, data: Dict) -> Dict:
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user