This commit is contained in:
Ayush Saini 2023-07-02 18:29:12 +05:30
commit d28f558470
2 changed files with 342 additions and 335 deletions

View file

@ -367,7 +367,12 @@
} }
], ],
"versions": { "versions": {
"2.0.0":null, "2.0.0": {
"api_version": 8,
"commit_sha": "da0e63d",
"released_on": "02-07-2023",
"md5sum": "7d90768d603fcf91b38ba7fa1d30501e"
},
"1.0.1": { "1.0.1": {
"api_version": 7, "api_version": 7,
"commit_sha": "64e8a5c", "commit_sha": "64e8a5c",

View file

@ -193,12 +193,9 @@ if not isinstance(SystemEncode, str):
SystemEncode = "utf-8" SystemEncode = "utf-8"
PingThread().start() PingThread().start()
class chatloggThread(): class chatloggThread():
"""Thread for sending out game pings.""" """Thread for sending out game pings."""
@ -1410,7 +1407,8 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
"""Called when a choice is selected in the popup.""" """Called when a choice is selected in the popup."""
global unmuted_names global unmuted_names
if self._popup_type == "banTimePress": if self._popup_type == "banTimePress":
result = _babase.disconnect_client(self._popup_party_member_client_id, ban_time=int(choice)) result = _babase.disconnect_client(
self._popup_party_member_client_id, ban_time=int(choice))
if not result: if not result:
bui.getsound('error').play() bui.getsound('error').play()
bs.broadcastmessage( bs.broadcastmessage(
@ -1653,7 +1651,8 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
self.popup_menu_selected_choice(popup_window, choice.replace( self.popup_menu_selected_choice(popup_window, choice.replace(
r"{$PlayerID}", str(playerID).replace("'", r"'").replace('"', r'\\"'))) r"{$PlayerID}", str(playerID).replace("'", r"'").replace('"', r'\\"')))
else: else:
bs.broadcastmessage(_getTransText("No_valid_player_id_found"), (1, 0, 0)) bs.broadcastmessage(_getTransText(
"No_valid_player_id_found"), (1, 0, 0))
bui.getsound("error").play() bui.getsound("error").play()
elif curKeyWord in (r"{$AccountInfo}",) != 0: elif curKeyWord in (r"{$AccountInfo}",) != 0:
self.popup_menu_selected_choice(popup_window, choice.replace( self.popup_menu_selected_choice(popup_window, choice.replace(
@ -1695,7 +1694,8 @@ def fetchAccountInfo(account, loading_widget):
if account in fdata: if account in fdata:
servers = fdata[account] servers = fdata[account]
url = f'https://{BCSSERVER}/player?key={base64.b64encode(account.encode("utf-8")).decode("utf-8")}&base64=true' url = f'https://{BCSSERVER}/player?key={base64.b64encode(account.encode("utf-8")).decode("utf-8")}&base64=true'
req = urllib.request.Request(url, headers={"User-Agent": f'BS{_babase.env().get("build_number", 0)}',"Accept-Language": "en-US,en;q=0.9",}) req = urllib.request.Request(url, headers={
"User-Agent": f'BS{_babase.env().get("build_number", 0)}', "Accept-Language": "en-US,en;q=0.9", })
data = urllib.request.urlopen(req) data = urllib.request.urlopen(req)
account_data = json.loads(data.read().decode('utf-8'))[0] account_data = json.loads(data.read().decode('utf-8'))[0]
pbid = account_data["pbid"] pbid = account_data["pbid"]
@ -2147,6 +2147,8 @@ class CustomAccountViewerWindow(viewer.AccountViewerWindow):
babase.print_exception('Error displaying account info.') babase.print_exception('Error displaying account info.')
# ba_meta export plugin # ba_meta export plugin
class bySmoothy(babase.Plugin): class bySmoothy(babase.Plugin):
def __init__(self): def __init__(self):
bs.connect_to_party = newconnect_to_party bs.connect_to_party = newconnect_to_party