This commit is contained in:
brostosjoined 2024-01-22 12:06:37 +03:00
parent d9d1226423
commit bfb5d25467
6 changed files with 80 additions and 244 deletions

View file

@ -370,13 +370,13 @@ def get_event_loop(force_fresh=False):
def _generate_join_secret(self):
# resp = requests.get('https://legacy.ballistica.net/bsAccessCheck').text
connection_info = bs.get_connection_to_host_info(
) if build_number < 21697 else bs.get_connection_to_host_info_2()
if connection_info:
addr = _last_server_addr
port = _last_server_port
else:
try:
try:
connection_info = bs.get_connection_to_host_info(
) if build_number < 21727 else bs.get_connection_to_host_info_2()
if connection_info:
addr = _last_server_addr
port = _last_server_port
else:
with urlopen(
"https://legacy.ballistica.net/bsAccessCheck"
) as resp:
@ -390,8 +390,8 @@ def get_event_loop(force_fresh=False):
"port": port,
}
self.join_secret = json.dumps(secret_dict)
except:
pass
except:
pass
def _update_secret(self):
threading.Thread(target=self._generate_join_secret, daemon=True).start()
@ -872,7 +872,7 @@ class DiscordRP(babase.Plugin):
def update_status(self) -> None:
roster = bs.get_game_roster()
connection_info = bs.get_connection_to_host_info(
) if build_number < 21697 else bs.get_connection_to_host_info_2()
) if build_number < 21727 else bs.get_connection_to_host_info_2()
self.rpc_thread.large_image_key = "bombsquadicon"
self.rpc_thread.large_image_text = "BombSquad"