updated dummymodules, fixed afk check
Some checks failed
CI / run_server_binary (push) Has been cancelled

This commit is contained in:
Ayush Saini 2025-09-07 23:46:31 +05:30
parent 8640706f30
commit 528209e18c
8 changed files with 339 additions and 146 deletions

View file

@ -56,7 +56,7 @@ def filter_chat_message(msg: str, client_id: int) -> str | None:
return handlechat.filter_chat_message(msg, client_id)
# ba_meta export babse.Plugin
# ba_meta export babase.Plugin
class modSetup(babase.Plugin):
def on_app_running(self):
"""Runs when app is launched."""
@ -384,7 +384,7 @@ def on_access_check_response(self, data):
if data is not None:
addr = data['address']
port = data['port']
if settings["ballistica_web"]["enabled"]:
if settings["ballistica_web"]["enable"]:
bs.set_public_party_stats_url(
f'https://bombsquad-community.web.app/server-manager/?host={addr}&port={port}')

View file

@ -15,7 +15,7 @@ cLastIdle = 0
class checkIdle(object):
def start(self):
self.t1 = bs.AppTimer(2, babase.Call(self.check), repeat=True)
self.t1 = babase.AppTimer(2, babase.Call(self.check), repeat=True)
self.lobbies = {}
def check(self):
@ -55,8 +55,8 @@ class checkIdle(object):
if lobby_afk in range(INLOBBY_TIME, INLOBBY_TIME + 10):
bs.broadcastmessage("Join game within " + str(
INLOBBY_TIME + 10 - lobby_afk) + " secs",
color=(1, 0, 0), transient=True,
clients=[player['client_id']])
color=(1, 0, 0), transient=True,
clients=[player['client_id']])
if lobby_afk > INLOBBY_TIME + 10:
bs.disconnect_client(player['client_id'], 0)
# clean the lobbies dict
@ -69,4 +69,4 @@ class checkIdle(object):
for player in bs.get_game_roster():
if player["account_id"] == pbid:
bs.broadcastmessage(msg, color=(1, 0, 0), transient=True,
clients=[player['client_id']])
clients=[player['client_id']])