mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
[ci] auto-format
This commit is contained in:
parent
018c962743
commit
da0e63d677
1 changed files with 336 additions and 334 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue