From 641c095dcda83c1a0b502e0f2153e46009e1f0b9 Mon Sep 17 00:00:00 2001 From: Sarasayed0118 <162738632+Sarasayed0118@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:29:21 +0530 Subject: [PATCH] Update pdata.py --- dist/ba_root/mods/playersData/pdata.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/ba_root/mods/playersData/pdata.py b/dist/ba_root/mods/playersData/pdata.py index edfb413..a993f39 100644 --- a/dist/ba_root/mods/playersData/pdata.py +++ b/dist/ba_root/mods/playersData/pdata.py @@ -164,12 +164,12 @@ def update_custom(): json.dump(custom, f, indent=4) def get_database(): - bannedplayers = mongo.banlist.find_one() + bannedplayers = mongo.Banlist.find_one() return bannedplayers def update_database(): - mongo.banlist.delete_many({}) - x = mongo.banlist.insert_one(bandata) + mongo.Banlist.delete_many({}) + x = mongo.Banlist.insert_one(bandata) print(x.inserted_id) @@ -383,7 +383,7 @@ def ban_player_mongo(account_id: str) -> None: device_id = _ba.get_client_device_uuid(cid) global bandata - bandata = mongo.banlist.find_one() + bandata = mongo.Banlist.find_one() bandata["ban"]["ips"].append(ip) bandata["ban"]["ids"].append(account_id) bandata["ban"]["deviceids"].append(device_id)