syncing ba_data

added kcik_vote_started in _hooks
This commit is contained in:
Ayush Saini 2023-08-19 22:37:30 +05:30
parent 6216752a83
commit ac44a78075
4 changed files with 9 additions and 11 deletions

View file

@ -35,8 +35,6 @@ def _cmd(command_data: bytes) -> None:
assert babase.app.classic is not None
command = pickle.loads(command_data)
print("server mode got command")
print(command)
assert isinstance(command, ServerCommand)
if isinstance(command, StartServerModeCommand):

View file

@ -52,7 +52,7 @@ if TYPE_CHECKING:
# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21212
TARGET_BALLISTICA_BUILD = 21213
TARGET_BALLISTICA_VERSION = '1.7.26'

View file

@ -31,11 +31,12 @@ def get_player_icon(sessionplayer: bascenev1.SessionPlayer) -> dict[str, Any]:
'tint_color': info['tint_color'],
'tint2_color': info['tint2_color'],
}
try:
import custom_hooks as chooks
except:
pass
def filter_chat_message(msg: str, client_id: int) -> str | None:
try:
import custom_hooks as chooks
except:
pass
"""Intercept/filter chat messages.
Called for all chat messages while hosting.
@ -47,7 +48,8 @@ def filter_chat_message(msg: str, client_id: int) -> str | None:
return chooks.filter_chat_message(msg,client_id)
except:
return msg
def kick_vote_started(by:str,to:str) -> None:
print("kick vot started by"+by+" to"+to)
def local_chat_message(msg: str) -> None:
classic = babase.app.classic

View file

@ -263,7 +263,6 @@ class PluginWindow(bui.Window):
def _show_plugins(self) -> None:
# pylint: disable=too-many-locals
# pylint: disable=too-many-branches
# pylint: disable=too-many-statements
plugspecs = bui.app.plugins.plugin_specs
plugstates: dict[str, dict] = bui.app.config.setdefault('Plugins', {})
assert isinstance(plugstates, dict)
@ -301,7 +300,6 @@ class PluginWindow(bui.Window):
else:
# Make sure we handle all cases.
assert_never(self._category)
sub_height = 0
num_shown = 0
for classpath, plugspec in plugspecs_sorted:
@ -316,7 +314,7 @@ class PluginWindow(bui.Window):
show = not enabled
else:
assert_never(self._category)
show = False
# show = False
if not show:
continue