mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-04-25 07:26:58 -05:00
Added names for maps and BAN detection
This commit is contained in:
parent
490698fbc1
commit
6b55dee011
|
|
@ -25,6 +25,16 @@ def queue_info():
|
|||
check_for_game_client("strict")
|
||||
session_cookie = sanitize_input(request.cookies.get("bhvrSession"))
|
||||
userid = session_manager.get_user_id(session_cookie)
|
||||
|
||||
# USER BAN CHECK
|
||||
try:
|
||||
u_data = mongo.get_data_with_list(login=userid, login_steam=False, items={"is_banned"})["is_banned"]
|
||||
if u_data:
|
||||
return jsonify({"message": "User is banned", "status": "error"}), 401
|
||||
except Exception as e:
|
||||
logger.graylog_logger(level="error", handler="extension_progression_init_or_get_groups", message=e)
|
||||
return jsonify({"status": "error"})
|
||||
|
||||
category = sanitize_input(request.args.get("category"))
|
||||
game_mode = sanitize_input(request.args.get("gameMode"))
|
||||
region = sanitize_input(request.args.get("region"))
|
||||
|
|
@ -56,6 +66,15 @@ def queue():
|
|||
session_cookie = sanitize_input(request.cookies.get("bhvrSession"))
|
||||
userid = session_manager.get_user_id(session_cookie)
|
||||
|
||||
# USER BAN CHECK
|
||||
try:
|
||||
u_data = mongo.get_data_with_list(login=userid, login_steam=False, items={"is_banned"})["is_banned"]
|
||||
if u_data:
|
||||
return jsonify({"message": "User is banned", "status": "error"}), 401
|
||||
except Exception as e:
|
||||
logger.graylog_logger(level="error", handler="extension_progression_init_or_get_groups", message=e)
|
||||
return jsonify({"status": "error"})
|
||||
|
||||
category = sanitize_input(request.json.get("category"))
|
||||
rank = request.json.get("rank")
|
||||
side = sanitize_input(request.json.get("side"))
|
||||
|
|
@ -252,7 +271,7 @@ def match_register(match_id_unsanitized):
|
|||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_DES_City_2Hunters.MatchConfig_DES_City_2Hunters":
|
||||
match_configuration = "Desert City 5 needles"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_WA_Rivers.MatchConfig_WA_Rivers":
|
||||
match_configuration = "Creek"
|
||||
match_configuration = "Salt Creek"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_WA_Cemetery.MatchConfig_WA_Cemetery":
|
||||
match_configuration = "Tombstone"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_DES_Oilfield.MatchConfig_DES_Oilfield":
|
||||
|
|
@ -262,9 +281,15 @@ def match_register(match_id_unsanitized):
|
|||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_DES_Mayan.MatchConfig_DES_Mayan":
|
||||
match_configuration = "Dust & Blood"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_ARC_Expedition.MatchConfig_ARC_Expedition":
|
||||
match_configuration = "Arctic Expedition"
|
||||
match_configuration = "Desperate Expedition"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_RUI_All.MatchConfig_RUI_All":
|
||||
match_configuration = "First Strike"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_DES_GoldRush.MatchConfig_DES_GoldRush":
|
||||
match_configuration = "Gold Rush"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_JUN_Fortress.MatchConfig_JUN_Fortress":
|
||||
match_configuration = "Forest Citadel"
|
||||
elif match_configuration == "/Game/Configuration/MatchConfig/MatchConfig_DES_Fortress.MatchConfig_DES_Fortress":
|
||||
match_configuration = "Legions Rest"
|
||||
|
||||
if dev_env == "false":
|
||||
webhook_data = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user