Updating rejoin.py to api 9

This commit is contained in:
Vishal 2025-01-21 23:24:35 +05:30 committed by GitHub
parent 6142a0b820
commit f6940f701b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View file

@ -96,6 +96,7 @@
} }
], ],
"versions": { "versions": {
"2.0.1": null,
"2.0.0": { "2.0.0": {
"api_version": 8, "api_version": 8,
"commit_sha": "333416f", "commit_sha": "333416f",

View file

@ -1,8 +1,8 @@
# ba_meta require api 8 # ba_meta require api 9
import bascenev1 as bs import bascenev1 as bs
from babase import Plugin as v from babase import Plugin as v
from bauiv1 import buttonwidget as z, gettexture as x from bauiv1 import buttonwidget as z, gettexture as x
from bauiv1lib.mainmenu import MainMenuWindow as m from bauiv1lib.ingamemenu import InGameMenuWindow as m
m.i = m.p = 0 m.i = m.p = 0
k = bs.connect_to_party k = bs.connect_to_party
@ -10,12 +10,13 @@ k = bs.connect_to_party
def j(address, port=43210, print_progress=False): def j(address, port=43210, print_progress=False):
try: try:
bs.disconnect_from_host() if bs.get_connection_to_host_info() is not None:
bs.disconnect_from_host()
m.i = address
m.p = port
k(m.i, m.p, print_progress)
except: except:
pass pass
m.i = address
m.p = port
k(m.i, m.p, print_progress)
def R(s): def R(s):