diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Handlers.py b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Handlers.py index 74f71ba..7c25553 100644 --- a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Handlers.py +++ b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Handlers.py @@ -7,7 +7,7 @@ import ba.internal def send(msg, clientid): """Shortcut To Send Private Msg To Client""" - _ba.chatmessage(str(msg), clients=[clientid]) + ba.internal.chatmessage(str(msg), clients=[clientid]) _ba.screenmessage(str(msg), transient=True, clients=[clientid]) diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py index 6acd9b6..7c8ec34 100644 --- a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py +++ b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py @@ -111,13 +111,13 @@ def ExcelCommand(command, arguments, clientid, accountid): def changepartysize(arguments): if len(arguments)==0: - _ba.chatmessage("enter number") + ba.internal.chatmessage("enter number") else: ba.internal.set_public_party_max_size(int(arguments[0])) def changeplaylist(arguments): if len(arguments)==0: - _ba.chatmessage("enter list code or name") + ba.internal.chatmessage("enter list code or name") else: if arguments[0]=='coop': serverdata.coopmode=True @@ -187,10 +187,10 @@ def get_profiles(arguments,clientid): def party_toggle(arguments): if arguments == ['public']: ba.internal.set_public_party_enabled(True) - _ba.chatmessage("party is public now") + ba.internal.chatmessage("party is public now") elif arguments == ['private']: ba.internal.set_public_party_enabled(False) - _ba.chatmessage("party is private now") + ba.internal.chatmessage("party is private now") else: pass @@ -454,11 +454,11 @@ def remove_command_to_role(arguments): # if arguments[0] == 'on': # if settings["white_list"]["whitelist_on"]: -# _ba.chatmessage("Already on") +# ba.internal.chatmessage("Already on") # else: # settings["white_list"]["whitelist_on"] = True # setting.commit(settings) -# _ba.chatmessage("whitelist on") +# ba.internal.chatmessage("whitelist on") # from tools import whitelist # whitelist.Whitelist() # return @@ -466,7 +466,7 @@ def remove_command_to_role(arguments): # elif arguments[0] == 'off': # settings["white_list"]["whitelist_on"] = False # setting.commit(settings) -# _ba.chatmessage("whitelist off") +# ba.internal.chatmessage("whitelist off") # return # else: @@ -475,7 +475,7 @@ def remove_command_to_role(arguments): # for i in rost: # if i['client_id'] == int(arguments[0]): # add_to_white_list(i['account_id'], i['display_string']) - # _ba.chatmessage(str(i['display_string'])+" whitelisted") + # ba.internal.chatmessage(str(i['display_string'])+" whitelisted") # add_commit_to_logs(accountid+" added "+i['account_id']) @@ -489,12 +489,12 @@ def spectators(arguments): if arguments[0] == 'on': settings["white_list"]["spectators"] = True setting.commit(settings) - _ba.chatmessage("spectators on") + ba.internal.chatmessage("spectators on") elif arguments[0] == 'off': settings["white_list"]["spectators"] = False setting.commit(settings) - _ba.chatmessage("spectators off") + ba.internal.chatmessage("spectators off") @@ -503,9 +503,9 @@ def change_lobby_check_time(arguments): try: argument = int(arguments[0]) except: - _ba.chatmessage("must type number to change lobby check time") + ba.internal.chatmessage("must type number to change lobby check time") return settings = setting.get_settings_data() settings["white_list"]["lobbychecktime"] = argument setting.commit(settings) - _ba.chatmessage(f"lobby check time is {argument} now") + ba.internal.chatmessage(f"lobby check time is {argument} now") diff --git a/dist/ba_root/mods/features/EndVote.py b/dist/ba_root/mods/features/EndVote.py index f3701e5..90332b5 100644 --- a/dist/ba_root/mods/features/EndVote.py +++ b/dist/ba_root/mods/features/EndVote.py @@ -24,7 +24,7 @@ def vote_end(pb_id, client_id): clients=[client_id]) return if len(voters) == 0: - _ba.chatmessage("end vote started") + ba.internal.chatmessage("end vote started") # clean up voters list active_players = [] @@ -40,10 +40,10 @@ def vote_end(pb_id, client_id): update_vote_text(required_votes(len(active_players)) - len(voters)) if required_votes(len(active_players)) - len( voters) == 3: # lets dont spam chat/screen message with votes required , only give message when only 3 votes left - _ba.chatmessage("3 more end votes required") + ba.internal.chatmessage("3 more end votes required") if len(voters) >= required_votes(len(active_players)): - _ba.chatmessage("end vote succeed") + ba.internal.chatmessage("end vote succeed") try: with _ba.Context(_ba.get_foreground_host_activity()): _ba.get_foreground_host_activity().end_game() diff --git a/dist/ba_root/mods/features/discord_bot.py b/dist/ba_root/mods/features/discord_bot.py index 4d139f4..651ed3c 100644 --- a/dist/ba_root/mods/features/discord_bot.py +++ b/dist/ba_root/mods/features/discord_bot.py @@ -48,7 +48,7 @@ async def on_message(message): channel=message.channel if message.channel.id==logsChannelID: - _ba.pushcall(Call(_ba.chatmessage,message.content),from_other_thread=True) + _ba.pushcall(Call(ba.internal.chatmessage,message.content),from_other_thread=True) @client.event @@ -188,7 +188,7 @@ class BsDataThread(object): #system={'cpu':80,'ram':34} # stats['system']=system stats['roster']=liveplayers - stats['chats']=_ba.get_chat_messages() + stats['chats']=ba.internal.get_chat_messages() stats['playlist']=minigame diff --git a/dist/ba_root/mods/tools/playlist.py b/dist/ba_root/mods/tools/playlist.py index 395fd9d..5e668a4 100644 --- a/dist/ba_root/mods/tools/playlist.py +++ b/dist/ba_root/mods/tools/playlist.py @@ -25,7 +25,7 @@ def set_playlist(content): _playlists_var = "{} Playlists".format(content["playlistType"]) playlists = _ba.app.config[_playlists_var] playlist = playlists[content["playlistName"]] - _ba.chatmessage("Fetched playlist:"+content["playlistName"]) + ba.internal.chatmessage("Fetched playlist:"+content["playlistName"]) typename = ( 'teams' if content['playlistType'] == 'Team Tournament' else 'ffa' if content['playlistType'] == 'Free-for-All' else '??') @@ -75,14 +75,14 @@ def set_next_map(session, game_map): def playlist(code): - _ba.add_transaction( + ba.internal.add_transaction( { 'type': 'IMPORT_PLAYLIST', 'code': str(code), 'overwrite': True }, callback=set_playlist) - _ba.run_transactions() + ba.internal.run_transactions() @@ -96,26 +96,26 @@ def setPlaylist(para): elif para in settings["playlists"]: playlist(settings["playlists"][para]) else: - _ba.chatmessage("Available Playlist") + ba.internal.chatmessage("Available Playlist") for play in settings["playlists"]: - _ba.chatmessage(play) + ba.internal.chatmessage(play) def flush_playlists(): print("Clearing old playlists..") for playlist in _ba.app.config["Team Tournament Playlists"]: - _ba.add_transaction( + ba.internal.add_transaction( { "type":"REMOVE_PLAYLIST", "playlistType":"Team Tournament", "playlistName":playlist }) - _ba.run_transactions() + ba.internal.run_transactions() for playlist in _ba.app.config["Free-for-All Playlists"]: - _ba.add_transaction( + ba.internal.add_transaction( { "type":"REMOVE_PLAYLIST", "playlistType":"Free-for-All", "playlistName":playlist }) - _ba.run_transactions() + ba.internal.run_transactions()