From 6151b1716700c0c83121fe384eb059c0566f96d9 Mon Sep 17 00:00:00 2001 From: ZKWolf <34097612+wolfswolke@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:34:44 +0200 Subject: [PATCH] Set challenges to DEV env --- src/endpoints/user_handeling.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/endpoints/user_handeling.py b/src/endpoints/user_handeling.py index dd555f3..513cd89 100644 --- a/src/endpoints/user_handeling.py +++ b/src/endpoints/user_handeling.py @@ -599,7 +599,8 @@ def challenges_execute_challenge_progression_operation_batch(): logger.graylog_logger(level="error", handler="executeChallengeProgressionOperationBatch",message=f"Unknown operation {operation_name}") if error_list: logger.graylog_logger(level="error", handler="executeChallengeProgressionOperationBatch", message=f"Error while saving challenges for {userId} with challenge_ids {error_list}") - get_challenge_ids_from_inventory(userId) + if dev_env: + get_challenge_ids_from_inventory(userId) return "", 204 except TimeoutError: return jsonify({"status": "error"}) @@ -1222,6 +1223,17 @@ def ban_status(): "BanStart": ban_data["ban_start"], "BanEnd": ban_data["ban_expire"], "Confirmed": False, "Pending": False}}) + # Ban Reasons Hardcoded: + # enum class EBanReasonEnum : uint8 { + # Unknown, + # HackingExploiting, + # Harassment, + # Spamming, + # PlayerDevImpersonation, + # InappropriateLanguage, + # RepeatedDisconnections, + # Griefing, + # }; elif not ban_data["is_banned"]: return jsonify({"IsBanned": ban_data["is_banned"]}) else: @@ -1456,7 +1468,7 @@ def messages_mark_as(): return jsonify({"status": "API error"}) -@app.route("/moderation/check/chat", methods=["POST"]) +@app.route('/moderation/check/chat', methods=["POST"]) def moderation_check_chat(): check_for_game_client("strict") session_cookie = sanitize_input(request.cookies.get("bhvrSession"))