diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Handlers.py b/dist/ba_root/mods/chatHandle/ChatCommands/Handlers.py
new file mode 100644
index 0000000..4439cee
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Handlers.py
@@ -0,0 +1,46 @@
+# Released under the MIT License. See LICENSE for details.
+
+from PlayersData import pdata
+import ba, _ba
+
+
+
+
+
+def clientid_to_accountid(clientid):
+ """
+ Transform Clientid To Accountid
+
+ Parameters:
+ clientid : int
+
+ Returns:
+ None
+ """
+ for i in _ba.get_game_roster():
+ if i['client_id'] == clientid:
+ return i['account_id']
+ return None
+
+
+
+
+
+def cheak_permissions(accountid, command):
+ """
+ Checks The Permission To Player To Executive Command
+
+ Parameters:
+ accountid : str
+ command : str
+
+ Returns:
+ Boolean
+ """
+ roles = pdata.get_roles()
+
+ for role in roles:
+ if accountid in roles[role]["ids"] and command in roles[role]["commands"]:
+ return True
+ return False
+
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Main.py b/dist/ba_root/mods/chatHandle/ChatCommands/Main.py
new file mode 100644
index 0000000..660b431
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Main.py
@@ -0,0 +1,84 @@
+# Released under the MIT License. See LICENSE for details.
+
+from .Handlers import clientid_to_accountid, cheak_permissions
+from .Objects import NormalCommands
+from .Objects import Management
+from .Objects import Fun
+from .Objects import Cheats
+
+import ba, _ba
+import setting
+
+
+
+
+def command_type(command):
+ """
+ Checks The Command Type
+
+ Parameters:
+ command : str
+
+ Returns:
+ any
+ """
+ if command in NormalCommands.Commands or command in NormalCommands.CommandAliases:
+ return "Normal"
+
+ if command in Management.Commands or command in Management.CommandAliases:
+ return "Manage"
+
+ if command in Fun.Commands or command in Fun.CommandAliases:
+ return "Fun"
+
+ if command in Cheats.Commands or command in Cheats.CommandAliases:
+ return "Cheats"
+
+
+
+
+
+
+
+def Command(msg, clientid):
+ """
+ Command Execution
+
+ Parameters:
+ msg : str
+ clientid : int
+
+ Returns:
+ any
+ """
+
+ command = msg.lower().split(" ")[0].split("/")[1]
+ arguments = msg.lower().split(" ")[1:]
+ accountid = clientid_to_accountid(clientid)
+
+
+ if command_type(command) == "Normal":
+ NormalCommands.ExcelCommand(command, arguments, clientid, accountid)
+
+
+ elif command_type(command) == "Manage":
+ if cheak_permissions(accountid, command):
+ Management.ExcelCommand(command, arguments, clientid, accountid)
+
+
+ elif command_type(command) == "Fun":
+ if cheak_permissions(accountid, command):
+ Fun.ExcelCommand(command, arguments, clientid, accountid)
+
+
+ elif command_type(command) == "Cheats":
+ if cheak_permissions(accountid, command):
+ Cheats.ExcelCommand(command, arguments, clientid, accountid)
+
+
+ settings = setting.get_settings_data()
+
+ if settings["ChatCommands"]["BrodcastCommand"]:
+ return msg
+ return None
+
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Cheats.py b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Cheats.py
new file mode 100644
index 0000000..a450337
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Cheats.py
@@ -0,0 +1,310 @@
+from .Handlers import handlemsg, handlemsg_all, clientid_to_myself
+import ba, _ba
+
+
+Commands = ['kill', 'heal', 'curse', 'sleep', 'superpunch', 'gloves', 'shield', 'freeze', 'unfreeze', 'godmode']
+CommandAliases = ['die', 'heath', 'cur', 'sp', 'punch', 'protect', 'ice', 'thaw', 'gm']
+
+
+
+
+
+def ExcelCommand(command, arguments, clientid, accountid):
+ """
+ Checks The Command And Run Function
+
+ Parameters:
+ command : str
+ arguments : str
+ clientid : int
+ accountid : int
+
+ Returns:
+ None
+ """
+
+ if command in ['kill', 'die']:
+ kill(arguments, clientid)
+
+ elif command in ['heal', 'heath']:
+ heal(arguments, clientid)
+
+ elif command in ['curse', 'cur']:
+ curse(arguments, clientid)
+
+ elif command == 'sleep':
+ sleep(arguments, clientid)
+
+ elif command in ['sp', 'superpunch']:
+ super_punch(arguments, clientid)
+
+ elif command in ['gloves', 'punch']:
+ gloves(arguments, clientid)
+
+ elif command in ['shield', 'protect']:
+ shield(arguments, clientid)
+
+ elif command in ['freeze', 'ice']:
+ freeze(arguments, clientid)
+
+ elif command in ['unfreeze', 'thaw']:
+ un_freeze(arguments, clientid)
+
+ elif command in ['gm', 'godmode']:
+ god_mode(arguments, clientid)
+
+
+
+
+def kill(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.DieMessage())
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.DieMessage())
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.DieMessage())
+ except:
+ return
+
+
+
+
+
+def heal(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.PowerupMessage(poweruptype='health'))
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.PowerupMessage(poweruptype='health'))
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.PowerupMessage(poweruptype='health'))
+ except:
+ return
+
+
+
+
+
+def curse(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.PowerupMessage(poweruptype='curse'))
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.PowerupMessage(poweruptype='curse'))
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.PowerupMessage(poweruptype='curse'))
+ except:
+ return
+
+
+
+
+
+def sleep(arguments, clientid):
+
+ activity = _ba.get_foreground_host_activity()
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ activity.players[myself].actor.node.handlemessage('knockout', 8000)
+
+ elif arguments[0] == 'all':
+ for i in activity.players:
+ i.actor.node.handlemessage('knockout', 8000)
+ else:
+ try:
+ req_player = int(arguments[0])
+ activity.players[req_player].actor.node.handlemessage('knockout', 8000)
+ except:
+ return
+
+
+
+
+
+def super_punch(arguments, clientid):
+
+ activity = _ba.get_foreground_host_activity()
+
+ if arguments == [] or arguments == ['']:
+
+ myself = clientid_to_myself(clientid)
+
+ if activity.players[myself].actor._punch_power_scale != 15:
+ activity.players[myself].actor._punch_power_scale = 15
+ activity.players[myself].actor._punch_cooldown = 0
+ else:
+ activity.players[myself].actor._punch_power_scale = 1.2
+ activity.players[myself].actor._punch_cooldown = 400
+
+ elif arguments[0] == 'all':
+
+ activity = _ba.get_foreground_host_activity()
+
+ for i in activity.players:
+ if i.actor._punch_power_scale != 15:
+ i.actor._punch_power_scale = 15
+ i.actor._punch_cooldown = 0
+ else:
+ i.actor._punch_power_scale = 1.2
+ i.actor._punch_cooldown = 400
+
+ else:
+ try:
+ activity = _ba.get_foreground_host_activity()
+ req_player = int(arguments[0])
+
+ if activity.players[req_player].actor._punch_power_scale != 15:
+ activity.players[req_player].actor._punch_power_scale = 15
+ activity.players[req_player].actor._punch_cooldown = 0
+ else:
+ activity.players[req_player].actor._punch_power_scale = 1.2
+ activity.players[req_player].actor._punch_cooldown = 400
+ except:
+ return
+
+
+
+
+
+def gloves(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.PowerupMessage(poweruptype='punch'))
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.PowerupMessage(poweruptype='punch'))
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.PowerupMessage(poweruptype='punch'))
+ except:
+ return
+
+
+
+
+
+def shield(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.PowerupMessage(poweruptype='shield'))
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.PowerupMessage(poweruptype='shield'))
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.PowerupMessage(poweruptype='shield'))
+ except:
+ return
+
+
+
+
+
+def freeze(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.FreezeMessage())
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.FreezeMessage())
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.FreezeMessage())
+ except:
+ return
+
+
+
+
+
+def un_freeze(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ handlemsg(myself, ba.ThawMessage())
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.ThawMessage())
+
+ else:
+ try:
+ req_player = int(arguments[0])
+ handlemsg(req_player, ba.ThawMessage())
+ except:
+ return
+
+
+
+
+
+def god_mode(arguments, clientid):
+
+ if arguments == [] or arguments == ['']:
+ myself = clientid_to_myself(clientid)
+ activity = _ba.get_foreground_host_activity()
+ player = activity.players[myself].actor
+
+ if player._punch_power_scale != 7:
+ player._punch_power_scale = 7
+ player.node.hockey = True
+ player.node.invincible = True
+
+ else:
+ player._punch_power_scale = 1.2
+ player.node.hockey = False
+ player.node.invincible = False
+
+ elif arguments[0] == 'all':
+
+ activity = _ba.get_foreground_host_activity()
+
+ for i in activity.players:
+ if i.actor._punch_power_scale != 7:
+ i.actor._punch_power_scale = 7
+ i.actor.node.hockey = True
+ i.actor.node.invincible = True
+ else:
+ i.actor._punch_power_scale = 1.2
+ i.actor.node.hockey = False
+ i.actor.node.invincible = False
+
+ else:
+ activity = _ba.get_foreground_host_activity()
+ req_player = int(arguments[0])
+ player = activity.players[req_player].actor
+
+ if player._punch_power_scale != 7:
+ player._punch_power_scale = 7
+ player.node.hockey = True
+ player.node.invincible = True
+
+ else:
+ player._punch_power_scale = 1.2
+ player.node.hockey = False
+ player.node.invincible = False
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Fun.py b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Fun.py
new file mode 100644
index 0000000..4f2a043
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Fun.py
@@ -0,0 +1,209 @@
+from .Handlers import handlemsg, handlemsg_all
+import ba, _ba
+
+
+Commands = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'spaz']
+CommandAliases = ['inv', 'hl', 'creep', 'celeb']
+
+
+
+
+def ExcelCommand(command, arguments, clientid, accountid):
+ """
+ Checks The Command And Run Function
+
+ Parameters:
+ command : str
+ arguments : str
+ clientid : int
+ accountid : int
+
+ Returns:
+ None
+ """
+
+ if command == 'fly':
+ fly(arguments)
+
+ elif command in ['inv', 'invisible']:
+ invi(arguments)
+
+ elif command in ['hl', 'headless']:
+ headless(arguments)
+
+ elif command in ['creepy', 'creep']:
+ creep(arguments)
+
+ elif command in ['celebrate', 'celeb']:
+ celeb(arguments)
+
+ elif command == 'spaz':
+ spaz(arguments)
+
+
+
+def fly(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ elif arguments[0] == 'all':
+
+ activity = _ba.get_foreground_host_activity()
+
+ for players in activity.players:
+ if players.actor.node.fly != True:
+ players.actor.node.fly = True
+ else:
+ players.actor.node.fly = False
+
+ else:
+ try:
+
+ activity = _ba.get_foreground_host_activity()
+ player = int(arguments[0])
+
+ if activity.players[player].actor.node.fly != True:
+ activity.players[player].actor.node.fly = True
+ else:
+ activity.players[player].actor.node.fly = False
+
+ except:
+ return
+
+
+
+
+def invi(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ elif arguments[0] == 'all':
+
+ activity = _ba.get_foreground_host_activity()
+
+ for i in activity.players:
+ body = i.actor.node
+ if body.torso_model != None:
+ body.head_model = None
+ body.torso_model = None
+ body.upper_arm_model = None
+ body.forearm_model = None
+ body.pelvis_model = None
+ body.hand_model = None
+ body.toes_model = None
+ body.upper_leg_model = None
+ body.lower_leg_model = None
+ body.style = 'cyborg'
+ else:
+
+ player = int(arguments[0])
+ activity = _ba.get_foreground_host_activity()
+
+ body = activity.players[player].actor.node
+
+ if body.torso_model != None:
+ body.head_model = None
+ body.torso_model = None
+ body.upper_arm_model = None
+ body.forearm_model = None
+ body.pelvis_model = None
+ body.hand_model = None
+ body.toes_model = None
+ body.upper_leg_model = None
+ body.lower_leg_model = None
+ body.style = 'cyborg'
+
+
+
+
+def headless(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ elif arguments[0] == 'all':
+
+ activity = _ba.get_foreground_host_activity()
+
+ for players in activity.players:
+
+ node = players.actor.node
+ if node.head_model != None:
+ node.head_model = None
+ node.style='cyborg'
+
+ else:
+ try:
+ player = int(arguments[0])
+ activity = _ba.get_foreground_host_activity()
+
+ node = activity.players[player].actor.node
+
+ if node.head_model != None:
+ node.head_model = None
+ node.style='cyborg'
+ except:
+ return
+
+
+
+def creep(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ elif arguments[0] == 'all':
+
+ activity = _ba.get_foreground_host_activity()
+
+ for players in activity.players:
+ node = players.actor.node
+
+ if node.head_model != None:
+ node.head_model = None
+ node.handlemessage(ba.PowerupMessage(poweruptype='punch'))
+ node.handlemessage(ba.PowerupMessage(poweruptype='shield'))
+
+ else:
+ try:
+ player = int(arguments[0])
+ activity = _ba.get_foreground_host_activity()
+
+ node = activity.players[player].actor.node
+
+ if node.head_model != None:
+ node.head_model = None
+ node.handlemessage(ba.PowerupMessage(poweruptype='punch'))
+ node.handlemessage(ba.PowerupMessage(poweruptype='shield'))
+ except:
+ return
+
+
+
+def celeb(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ elif arguments[0] == 'all':
+ handlemsg_all(ba.CelebrateMessage())
+
+ else:
+ try:
+ player = int(arguments[0])
+ handlemsg(player, ba.CelebrateMessage())
+ except:
+ return
+
+
+
+
+
+def spaz(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ return
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Handlers.py b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Handlers.py
new file mode 100644
index 0000000..d62362e
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Handlers.py
@@ -0,0 +1,48 @@
+""" Some useful handlers to reduce lot of code """
+import _ba, ba
+
+
+
+def send(msg, clientid):
+ """Shortcut To Send Private Msg To Client"""
+
+ _ba.chatmessage(str(msg), clients=[clientid])
+ _ba.screenmessage(str(msg), transient=True, clients=[clientid])
+
+
+
+
+
+def clientid_to_myself(clientid):
+ """Return Player Index Of Self Player"""
+
+ session = _ba.get_foreground_host_session()
+
+ for i in range(len(session.sessionplayers)):
+ if session.sessionplayers[i].inputdevice.client_id == clientid:
+ return int(session.sessionplayers[i].id)
+
+
+
+
+
+def handlemsg(client, msg):
+ """Handles Spaz Msg For Single Player"""
+
+ activity = _ba.get_foreground_host_activity()
+ activity.players[client].actor.node.handlemessage(msg)
+
+
+
+
+
+def handlemsg_all(msg):
+ """Handle Spaz message for all players in activity"""
+
+ activity = _ba.get_foreground_host_activity()
+
+ for i in activity.players:
+ i.actor.node.handlemessage(msg)
+
+
+
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Management.py b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Management.py
new file mode 100644
index 0000000..83b65b2
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/Management.py
@@ -0,0 +1,332 @@
+from .Handlers import handlemsg, handlemsg_all
+from PlayersData import pdata
+from tools.whitelist import add_to_white_list, add_commit_to_logs
+
+import ba, _ba, time, setting
+
+
+Commands = ['kick', 'remove', 'end', 'quit', 'mute', 'unmute', 'slowmo', 'nv', 'dv', 'pause', 'cameramode', 'createrole', 'addrole', 'removerole', 'addcommand', 'addcmd', 'removecommand', 'removecmd', 'changetag', 'add', 'spectators', 'lobbytime']
+CommandAliases = ['rm', 'next', 'restart', 'mutechat', 'unmutechat', 'sm', 'slow', 'night', 'day', 'pausegame', 'camera_mode', 'rotate_camera', 'whitelist']
+
+
+
+def ExcelCommand(command, arguments, clientid, accountid):
+ """
+ Checks The Command And Run Function
+
+ Parameters:
+ command : str
+ arguments : str
+ clientid : int
+ accountid : int
+
+ Returns:
+ None
+ """
+ if command == 'kick':
+ kick(arguments)
+
+ elif command in ['end', 'next']:
+ end(arguments)
+
+ elif command in ['quit', 'restart']:
+ quit(arguments)
+
+ elif command in ['mute', 'mutechat']:
+ mute()
+
+ elif command in ['unmute', 'unmutechat']:
+ un_mute()
+
+ elif command in ['remove', 'rm']:
+ remove(arguments)
+
+ elif command in ['sm', 'slow', 'slowmo']:
+ slow_motion()
+
+ elif command in ['nv', 'night']:
+ nv(arguments)
+
+ elif command in ['dv', 'day']:
+ dv(arguments)
+
+ elif command in ['pause', 'pausegame']:
+ pause()
+
+ elif command in ['cameraMode', 'camera_mode', 'rotate_camera']:
+ rotate_camera()
+
+ elif command == 'createrole':
+ create_role_call(arguments)
+
+ elif command == 'addrole':
+ add_role_to_player(arguments)
+
+ elif command == 'removerole':
+ remove_role_from_player(arguments)
+
+ elif command in ['addcommand', 'addcmd']:
+ add_command_to_role(arguments)
+
+ elif command in ['removecommand', 'removecmd']:
+ remove_command_to_role(arguments)
+
+ elif command == 'changetag':
+ change_role_tag_call(arguments)
+
+ elif command in ['add', 'whitelist']:
+ whitelst_it(accountid, arguments)
+
+ elif command == 'spectators':
+ spectators(arguments)
+
+ elif command == 'lobbytime':
+ change_lobby_check_time(arguments)
+
+
+
+
+
+
+
+
+def kick(arguments):
+ return
+
+
+
+def end(arguments):
+
+ if arguments == [] or arguments == ['']:
+
+ activity = _ba.get_foreground_host_activity()
+ activity.end_game()
+
+
+
+def quit(arguments):
+
+ if arguments == [] or arguments == ['']:
+ ba.quit()
+
+
+
+def mute():
+ return
+
+
+
+def un_mute():
+ return
+
+
+
+def remove(arguments):
+
+ if arguments == [] or arguments == ['']:
+ return
+
+ elif arguments[0] == 'all':
+ session = _ba.get_foreground_host_session()
+ for i in session.sessionplayers:
+ i.remove_from_game()
+
+ else:
+ try:
+ session = _ba.get_foreground_host_session()
+ session.sessionplayers[int(arguments[0])].remove_from_game()
+ except:
+ return
+
+
+
+def slow_motion():
+
+ activity = _ba.get_foreground_host_activity()
+
+ if activity.globalsnode.slow_motion != True:
+ activity.globalsnode.slow_motion = True
+
+ else:
+ activity.globalsnode.slow_motion = False
+
+
+
+def nv(arguments):
+
+ activity = _ba.get_foreground_host_activity()
+
+ if arguments == [] or arguments == ['']:
+
+ if activity.globalsnode.tint != (0.5, 0.7, 1.0):
+ activity.globalsnode.tint = (0.5, 0.7, 1.0)
+ else:
+ #will fix this soon
+ pass
+
+ elif arguments[0] == 'off':
+ if activity.globalsnode.tint != (0.5, 0.7, 1.0):
+ return
+ else:
+ pass
+
+
+
+def dv(arguments):
+
+ activity = _ba.get_foreground_host_activity()
+
+ if arguments == [] or arguments == ['']:
+
+ if activity.globalsnode.tint != (1,1,1):
+ activity.globalsnode.tint = (1,1,1)
+ else:
+ #will fix this soon
+ pass
+
+ elif arguments[0] == 'off':
+ if activity.globalsnode.tint != (1,1,1):
+ return
+ else:
+ pass
+
+
+
+def pause():
+
+ activity = _ba.get_foreground_host_activity()
+
+ if activity.globalsnode.paused != True:
+ activity.globalsnode.paused = True
+
+ else:
+ activity.globalsnode.paused = False
+
+
+def rotate_camera():
+
+ activity = _ba.get_foreground_host_activity()
+
+ if activity.globalsnode.camera_mode != 'rotate':
+ activity.globalsnode.camera_mode = 'rotate'
+
+ else:
+ activity.globalsnode.camera_mode == 'normal'
+
+
+
+def create_role(arguments):
+ try:
+ pdata.create_role(arguments[0])
+ except:
+ return
+
+
+def add_role_to_player(arguments):
+ try:
+
+ session = _ba.get_foreground_host_session()
+
+ id = session.sessionplayers[int(arguments[1])].get_account_id()
+
+ pdata.add_player_role(arguments[0], id)
+ except:
+ return
+
+
+
+def remove_role_from_player(arguments):
+ try:
+ session = _ba.get_foreground_host_session()
+
+ id = session.sessionplayers[int(arguments[1])].get_account_id()
+
+ pdata.remove_player_role(arguments[0], id)
+ except:
+ return
+
+
+def change_role_tag(arguments):
+ try:
+ pdata.change_role_tag(arguments[0], arguments[1])
+ except:
+ return
+
+
+
+all_commands = ["changetag","createrole", "addrole", "removerole", "addcommand", "addcmd","removecommand","removecmd","kick","remove","rm","end","next","quit","restart","mute","mutechat","unmute","unmutechat","sm","slow","slowmo","nv","night","dv","day","pause","pausegame","cameraMode","camera_mode","rotate_camera","kill","die","heal","heath","curse","cur","sleep","sp","superpunch","gloves","punch","shield","protect","freeze","ice","unfreeze","thaw","gm","godmode","fly","inv","invisible","hl","headless","creepy","creep","celebrate","celeb","spaz"]
+
+
+
+def add_command_to_role(arguments):
+ try:
+ if arguments[1] in all_commands:
+ pdata.add_command_role(arguments[0], arguments[1])
+ except:
+ return
+
+
+
+def remove_command_to_role(arguments):
+ try:
+ if arguments[1] in all_commands:
+ pdata.remove_command_role(arguments[0], arguments[1])
+ except:
+ return
+
+
+
+def whitelst_it(accountid : str, arguments):
+ settings = setting.get_settings_data()
+
+ if arguments[0] == 'on':
+ settings["white_list"]["whitelist_on"] = True
+ setting.commit(settings)
+ cmsg("whitelist on")
+ return
+
+ elif arguments[0] == 'off':
+ settings["white_list"]["whitelist_on"] = False
+ setting.commit(settings)
+ cmsg("whitelist off")
+ return
+
+ else:
+ rost = _ba.get_game_roster()
+
+ for i in rost:
+ if i['client_id'] == int(arguments[0]):
+ add_to_white_list(i['account_id'], i['display_string'])
+ cmsg(str(i['display_string'])+" whitelisted")
+ add_commit_to_logs(accountid+" added "+i['account_id'])
+
+
+
+
+def spectators(arguments):
+
+ if arguments[0] in ['on', 'off']:
+ settings = setting.get_settings_data()
+
+ if arguments[0] == 'on':
+ settings["white_list"]["spectators"] = True
+ setting.commit(settings)
+ cmsg("spectators on")
+
+ elif arguments[0] == 'off':
+ settings["white_list"]["spectators"] = False
+ setting.commit(settings)
+ cmsg("spectators off")
+
+
+
+
+def change_lobby_check_time(arguments):
+ try:
+ argument = int(arguments[0])
+ except:
+ cmsg("must type numbe to change lobby check time")
+ settings = setting.get_settings_data()
+ settings["white_list"]["lobbychecktime"] = argument
+ setting.commit(settings)
+ cmsg(f"lobby check time is {arg} now")
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/NormalCommands.py b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/NormalCommands.py
new file mode 100644
index 0000000..ba5ab83
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/NormalCommands.py
@@ -0,0 +1,81 @@
+from .Handlers import send
+import ba, _ba
+
+
+Commands = ['me', 'list', 'uniqeid']
+CommandAliases = ['stats', 'score', 'rank', 'myself', 'l', 'id', 'pb-id', 'pb', 'accountid']
+
+
+
+def ExcelCommand(command, arguments, clientid, accountid):
+ """
+ Checks The Command And Run Function
+
+ Parameters:
+ command : str
+ arguments : str
+ clientid : int
+ accountid : int
+
+ Returns:
+ None
+ """
+ if command in ['me', 'stats', 'score', 'rank', 'myself']:
+ stats()
+
+ elif command in ['list', 'l']:
+ list(clientid)
+
+ elif command in ['uniqeid', 'id', 'pb-id', 'pb' , 'accountid']:
+ accountid_request(arguments, clientid, accountid)
+
+
+
+
+
+def stats():
+ """ Stats """
+ return
+
+
+
+
+def list(clientid):
+ """Returns The List Of Players Clientid and index"""
+
+ p = u'{0:^16}{1:^15}{2:^10}'
+ seprator = '\n______________________________\n'
+
+
+ list = p.format('Name', 'Client ID' , 'Player ID')+seprator
+ session = _ba.get_foreground_host_session()
+
+
+ for i in session.sessionplayers:
+ list += p.format(i.getname(icon = False),
+ i.inputdevice.client_id, i.id)
+
+ send(list, clientid)
+
+
+
+
+def accountid_request(arguments, clientid, accountid):
+ """Returns The Account Id Of Players"""
+
+ if arguments == [] or arguments == ['']:
+ send(f"Your account id is {accountid} ", clientid)
+
+ else:
+ try:
+ session = _ba.get_foreground_host_session()
+ player = session.sessionplayers[int(arguments[0])]
+
+ name = player.getname(full=True, icon=True)
+ accountid = player.get_account_id()
+
+ send(f" {name}'s account id is '{accountid}' ", clientid)
+ except:
+ return
+
+
\ No newline at end of file
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/NormalCommands.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/NormalCommands.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..e194f92
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/NormalCommands.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/cheats.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/cheats.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..85d2b32
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/cheats.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/fun.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/fun.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..553929f
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/fun.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/handlers.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/handlers.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..4aa2968
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/handlers.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/management.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/management.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..61b3cd2
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/management.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/normal_commands.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/normal_commands.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..0d79fe5
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/Objects/__pycache__/normal_commands.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/stats/__init__.py b/dist/ba_root/mods/chatHandle/ChatCommands/__init__.py
similarity index 98%
rename from dist/ba_root/mods/stats/__init__.py
rename to dist/ba_root/mods/chatHandle/ChatCommands/__init__.py
index 1f50d61..cdc7758 100644
--- a/dist/ba_root/mods/stats/__init__.py
+++ b/dist/ba_root/mods/chatHandle/ChatCommands/__init__.py
@@ -4,4 +4,4 @@
Things in here should be hardened, highly type-safe, and well-covered by unit
tests since they are widely used in live client and server code.
-"""
+"""
\ No newline at end of file
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..1447b70
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/stats/__pycache__/__init__.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/__init__.cpython-38.opt-1.pyc
similarity index 53%
rename from dist/ba_root/mods/stats/__pycache__/__init__.cpython-38.opt-1.pyc
rename to dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/__init__.cpython-38.opt-1.pyc
index 7ed55b3..29491a4 100644
Binary files a/dist/ba_root/mods/stats/__pycache__/__init__.cpython-38.opt-1.pyc and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/__init__.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/chatcmd.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/chatcmd.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..b3f9ba1
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/chatcmd.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/cheats.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/cheats.cpython-38.opt-1.pyc
similarity index 99%
rename from dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/cheats.cpython-38.opt-1.pyc
rename to dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/cheats.cpython-38.opt-1.pyc
index 42371ae..e64f34d 100644
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/cheats.cpython-38.opt-1.pyc and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/cheats.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/fun.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/fun.cpython-38.opt-1.pyc
similarity index 97%
rename from dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/fun.cpython-38.opt-1.pyc
rename to dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/fun.cpython-38.opt-1.pyc
index e53cfa4..e29ba7b 100644
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/fun.cpython-38.opt-1.pyc and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/fun.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/handlers.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/handlers.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..d3ee7d3
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/handlers.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/management.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/management.cpython-38.opt-1.pyc
new file mode 100644
index 0000000..94244f3
Binary files /dev/null and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/management.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/normal_commands.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/normal_commands.cpython-38.opt-1.pyc
similarity index 96%
rename from dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/normal_commands.cpython-38.opt-1.pyc
rename to dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/normal_commands.cpython-38.opt-1.pyc
index 5390a8a..0161df4 100644
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/normal_commands.cpython-38.opt-1.pyc and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/normal_commands.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.opt-1.pyc
index afc2db2..0980eba 100644
Binary files a/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.opt-1.pyc and b/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.pyc b/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.pyc
deleted file mode 100644
index c36c83c..0000000
Binary files a/dist/ba_root/mods/chatHandle/__pycache__/__init__.cpython-38.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.opt-1.pyc
index 1359ebd..260e53b 100644
Binary files a/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.opt-1.pyc and b/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.pyc b/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.pyc
deleted file mode 100644
index e99c015..0000000
Binary files a/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-38.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__init__.py b/dist/ba_root/mods/chatHandle/chatCMDS/__init__.py
deleted file mode 100644
index 1f50d61..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
-#
-"""Common bits of functionality shared between all efro projects.
-
-Things in here should be hardened, highly type-safe, and well-covered by unit
-tests since they are widely used in live client and server code.
-"""
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/__init__.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/__init__.cpython-38.opt-1.pyc
deleted file mode 100644
index 68ca7f6..0000000
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/__init__.cpython-38.opt-1.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/chatcmd.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/chatcmd.cpython-38.opt-1.pyc
deleted file mode 100644
index 7a9f7d1..0000000
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/chatcmd.cpython-38.opt-1.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/handlers.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/handlers.cpython-38.opt-1.pyc
deleted file mode 100644
index aee9bed..0000000
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/handlers.cpython-38.opt-1.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/management.cpython-38.opt-1.pyc b/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/management.cpython-38.opt-1.pyc
deleted file mode 100644
index ae9f7a3..0000000
Binary files a/dist/ba_root/mods/chatHandle/chatCMDS/__pycache__/management.cpython-38.opt-1.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/chatcmd.py b/dist/ba_root/mods/chatHandle/chatCMDS/chatcmd.py
deleted file mode 100644
index b7cfd50..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/chatcmd.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
-
-import ba, _ba
-import setting
-from playersData import pdata
-from . import fun
-from . import management, cheats, normal_commands as normal_cmds
-
-
-def client_to_account(client_id):
- rost = _ba.get_game_roster()
- for i in rost:
- if i['client_id'] == client_id:
- return i['account_id']
- return None
-
-
-def check_permission(account_id, command):
- roles = pdata.get_roles()
- for role in roles:
- if account_id in roles[role]["ids"] and command in roles[role]["commands"]:
- return True
- return False
-
-
-def cmd_type(cmnd):
-
- if cmnd in normal_cmds.cmnds or cmnd in normal_cmds.cmnd_aliases:
- return "normal_cmd"
-
- if cmnd in management.cmnds or cmnd in management.cmnd_aliases:
- return "management"
-
- if cmnd in fun.cmnds or cmnd in fun.cmnd_aliases:
- return "fun"
-
- if cmnd in cheats.cmnds or cmnd in cheats.cmnd_aliases:
- return "cheats"
-
-
-def cmd(msg, client_id):
- cmnd = msg.split(" ")[0].lower().split("/")[1]
- arg = msg.split(" ")[1:]
- acid = "pb-IF48VgWkBFQ"
-#client_to_account(client_id)
-
- if cmd_type(cmnd) == "fun":
- if check_permission(acid, cmnd):
- fun.exec_cmd(cmnd, arg, client_id, acid)
-
- elif cmd_type(cmnd) == "management":
- if check_permission(acid, cmnd):
- management.exec_cmd(cmnd, arg, client_id, acid)
-
- elif cmd_type(cmnd) == "cheats":
- if check_permission(acid, cmnd):
- cheats.exec_cmd(cmnd, arg, client_id, acid)
-
- elif cmd_type(cmnd) == "normal_cmd":
- normal_cmds.exec_cmd(cmnd, arg, client_id, acid)
-
- else:
- _ba.chatmessage("no access")
-
-
- if setting.brdcast_chatcmd:
- return msg
- return None
-
-
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/cheats.py b/dist/ba_root/mods/chatHandle/chatCMDS/cheats.py
deleted file mode 100644
index 5b04256..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/cheats.py
+++ /dev/null
@@ -1,236 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
-
-from _ba import chatmessage as cmsg, screenmessage as smsg
-from .handlers import activity_players, on_command_error, handlemsg, handlemsg_all
-import ba, _ba, time
-
-cmnds = ['kill', 'heal', 'curse', 'sleep', 'superpunch', 'gloves', 'shield', 'freeze', 'unfreeze', 'godmode']
-
-cmnd_aliases = ['die', 'heath', 'cur', 'sp', 'punch', 'protect', 'ice', 'thaw', 'gm']
-
-
-
-def exec_cmd(cmnd, arg, client_id, pbid):
-
- if cmnd in ['kill', 'die']:
- kill_call(arg)
-
- elif cmnd in ['heal', 'heath']:
- heal_call(arg)
-
- elif cmnd in ['curse', 'cur']:
- curse_call(arg)
-
- elif cmnd in ['sleep']:
- sleep_call(arg)
-
- elif cmnd in ['sp', 'superpunch']:
- super_punch_call(arg)
-
- elif cmnd in ['gloves', 'punch']:
- gloves_call(arg)
-
- elif cmnd in ['shield', 'protect']:
- shield_call(arg)
-
- elif cmnd in ['freeze', 'ice']:
- freeze_call(arg)
-
- elif cmnd in ['unfreeze', 'thaw']:
- un_freeze_call(arg)
-
- elif cmnd in ['gm', 'godmode']:
- god_mode_call(arg)
-
-
-
-
-def kill_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.DieMessage())
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.DieMessage())
- except:
- return
-
-
-
-
-
-def heal_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.PowerupMessage(poweruptype='health'))
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.PowerupMessage(poweruptype='health'))
- except:
- return
-
-
-def curse_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.PowerupMessage(poweruptype='curse'))
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.PowerupMessage(poweruptype='curse'))
- except:
- return
-
-
-
-def sleep_call(arg):
- if on_command_error(arg):
- return
- # ahh ! harsh here maybe fix in future
- elif arg[0] == 'all':
- for i in activity_players():
- i.actor.node.handlemessage('knockout', 8000)
- else:
- try:
- req_player = int(arg[0])
- activity_players()[req_player].actor.node.handlemessage('knockout', 8000)
- except:
- return
-
-
-
-def super_punch_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- for i in activity_players():
- if i.actor._punch_power_scale != 15:
- i.actor._punch_power_scale = 15
- i.actor._punch_cooldown = 0
- else:
- i.actor._punch_power_scale = 1.2
- i.actor._punch_cooldown = 400
-
- else:
- try:
- req_player = int(arg[0])
-
- if activity_players()[req_player].actor._punch_power_scale != 15:
- activity_players()[req_player].actor._punch_power_scale = 15
- activity_players()[req_player].actor._punch_cooldown = 0
- else:
- activity_players()[req_player].actor._punch_power_scale = 1.2
- activity_players()[req_player].actor._punch_cooldown = 400
- except:
- return
-
-
-
-def gloves_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.PowerupMessage(poweruptype='punch'))
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.PowerupMessage(poweruptype='punch'))
- except:
- return
-
-
-
-def shield_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.PowerupMessage(poweruptype='shield'))
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.PowerupMessage(poweruptype='shield'))
- except:
- return
-
-
-
-def freeze_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.FreezeMessage())
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.FreezeMessage())
- except:
- return
-
-
-
-def un_freeze_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.ThawMessage())
-
- else:
- try:
- req_player = int(arg[0])
- handlemsg(req_player, ba.ThawMessage())
- except:
- return
-
-
-
-def god_mode_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
-
- for i in activity_players():
- if i.actor._punch_power_scale != 7:
- i.actor._punch_power_scale = 7
- i.actor.node.hockey = True
- i.actor.node.invincible = True
- else:
- i.actor._punch_power_scale = 1.2
- i.actor.node.hockey = False
- i.actor.node.invincible = False
-
- else:
- req_player = int(arg[0])
- player = activity_players()[req_player].actor
-
- if player._punch_power_scale != 7:
- player._punch_power_scale = 7
- player.node.hockey = True
- player.node.invincible = True
-
- else:
- player._punch_power_scale = 1.2
- player.node.hockey = False
- player.node.invincible = False
-
-
-
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/fun.py b/dist/ba_root/mods/chatHandle/chatCMDS/fun.py
deleted file mode 100644
index ff1612f..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/fun.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
-
-
-from _ba import chatmessage as cmsg, screenmessage as smsg
-from .handlers import activity_players, on_command_error, handlemsg, handlemsg_all
-import ba, _ba
-
-
-cmnds = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'spaz']
-
-cmnd_aliases = ['inv', 'hl', 'creep', 'celeb']
-
-
-def exec_cmd(cmnd, arg, clid, pbid):
-
- if cmnd in ['fly']:
- fly_call(arg)
-
- elif cmnd in ['inv', 'invisible']:
- invi_call(arg)
-
- elif cmnd in ['hl', 'headless']:
- headless_call(arg)
-
- elif cmnd in ['creepy', 'creep']:
- creep_call(arg)
-
- elif cmnd in ['celebrate', 'celeb']:
- celeb_call(arg)
-
- elif cmnd in ['spaz']:
- spaz_call(arg)
-
-
-
-def fly_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
-
- for players in activity_players():
- if players.actor.node.fly != True:
- players.actor.node.fly = True
- else:
- players.actor.node.fly = False
-
- else:
- try:
- player = int(arg[0])
-
- if activity_players()[player].actor.node.fly != True:
- activity_players()[player].actor.node.fly = True
- else:
- activity_players()[player].actor.node.fly = False
-
- except:
- return
-
-
-
-
-def invi_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- for i in activity_players():
- body = i.actor.node
- if body.torso_model != None:
- body.head_model = None
- body.torso_model = None
- body.upper_arm_model = None
- body.forearm_model = None
- body.pelvis_model = None
- body.hand_model = None
- body.toes_model = None
- body.upper_leg_model = None
- body.lower_leg_model = None
- body.style = 'cyborg'
- else:
-
- player = int(arg[0])
- body = activity_players()[player].actor.node
-
- if body.torso_model != None:
- body.head_model = None
- body.torso_model = None
- body.upper_arm_model = None
- body.forearm_model = None
- body.pelvis_model = None
- body.hand_model = None
- body.toes_model = None
- body.upper_leg_model = None
- body.lower_leg_model = None
- body.style = 'cyborg'
-
-
-
-
-def headless_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
-
- for players in activity_players():
- node = players.actor.node
-
- if node.head_model != None:
- node.head_model = None
- node.style='cyborg'
-
- else:
- try:
- player = int(arg[0])
- node = activity_players()[player].actor.node
-
- if node.head_model != None:
- node.head_model = None
- node.style='cyborg'
- except:
- return
-
-
-
-def creep_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
-
- for players in activity_players():
- node = players.actor.node
-
- if node.head_model != None:
- node.head_model = None
- node.handlemessage(ba.PowerupMessage(poweruptype='punch'))
- node.handlemessage(ba.PowerupMessage(poweruptype='shield'))
-
- else:
- try:
- player = int(arg[0])
- node = activity_players()[player].actor.node
-
- if node.head_model != None:
- node.head_model = None
- node.handlemessage(ba.PowerupMessage(poweruptype='punch'))
- node.handlemessage(ba.PowerupMessage(poweruptype='shield'))
- except:
- return
-
-
-
-def celeb_call(arg):
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- handlemsg_all(ba.CelebrateMessage())
-
- else:
- try:
- player = int(arg[0])
- handlemsg(player, ba.CelebrateMessage())
- except:
- return
-
-
-
-
-
-def spaz_call(arg):
- if on_command_error(arg):
- return
-
- pass
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/handlers.py b/dist/ba_root/mods/chatHandle/chatCMDS/handlers.py
deleted file mode 100644
index 5a414e1..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/handlers.py
+++ /dev/null
@@ -1,26 +0,0 @@
-""" helper functions to reduce lot code """
-import _ba, ba
-
-
-def activity_players():
- return _ba.get_foreground_host_activity().players
-
-def sess_players():
- return _ba.get_foreground_host_session().sessionplayers
-
-def on_command_error(arg):
- if arg == [] or arg == ['']:
- return True
- return False
-
-
-
-def handlemsg(client, msg):
- activity_players()[client].actor.node.handlemessage(msg)
-
-def handlemsg_all(msg):
- for i in activity_players():
- i.actor.node.handlemessage(msg)
-
-
-
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/management.py b/dist/ba_root/mods/chatHandle/chatCMDS/management.py
deleted file mode 100644
index 620ca00..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/management.py
+++ /dev/null
@@ -1,260 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
-
-from _ba import chatmessage as cmsg, screenmessage as smsg
-from .handlers import activity_players, sess_players, on_command_error, handlemsg, handlemsg_all
-from playersData import pdata
-import ba, _ba, time
-
-cmnds = ['kick', 'remove', 'end', 'quit', 'mute', 'unmute', 'slowmo', 'nv', 'dv', 'pause', 'cameramode', 'createrole', 'addrole', 'removerole', 'addcommand', 'addcmd', 'removecommand', 'removecmd', 'changetag']
-
-cmnd_aliases = ['rm', 'next', 'restart', 'mutechat', 'unmutechat', 'sm', 'slow', 'night', 'day', 'pausegame', 'camera_mode', 'rotate_camera']
-
-def exec_cmd(cmnd, arg, client_id, pbid):
- if cmnd in ['kick']:
- kick(arg[0])
-
- elif cmnd in ['end', 'next']:
- end_call(arg)
-
- elif cmnd in ['quit', 'restart']:
- quit_call(arg)
-
- elif cmnd in ['mute', 'mutechat']:
- mute_call()
-
- elif cmnd in ['unmute', 'unmutechat']:
- un_mute_call()
-
- elif cmnd in ['remove', 'rm']:
- remove_call(arg)
-
- elif cmnd in ['sm', 'slow', 'slowmo']:
- slow_mo_call()
-
- elif cmnd in ['nv', 'night']:
- nv_call(arg)
-
- elif cmnd in ['dv', 'day']:
- dv_call(arg)
-
- elif cmnd in ['pause', 'pausegame']:
- pause_call()
-
- elif cmnd in ['cameraMode', 'camera_mode', 'rotate_camera']:
- rotate_camera_call()
-
- elif cmnd in ['createrole']:
- create_role_call(arg)
-
- elif cmnd in ['addrole']:
- add_role_to_player(arg)
-
- elif cmnd in ['removerole']:
- remove_role_from_player(arg)
-
- elif cmnd in ['addcommand', 'addcmd']:
- add_command_to_role(arg)
-
- elif cmnd in ['removecommand', 'removecmd']:
- remove_command_to_role(arg)
-
- elif cmnd in ['changetag']:
- change_role_tag_call(arg)
-
-
-
-
-# =============
-
-
-def kick(client_id):
- _ba.disconnectclient(client_id)
-
-
-def remove_call(arg):
-
- if on_command_error(arg):
- return
-
- elif arg[0] == 'all':
- for i in sess_players():
- i.remove_from_game()
-
- else:
- try:
- req_player = int(arg[0])
- sess_players()[req_player].remove_from_game()
- except:
- return
-
-
-def add():
- pass
-
-
-def end_call(arg):
- if arg == [] or arg == ['']:
- activity = _ba.get_foreground_host_activity()
- activity.end_game()
-"""
- else:
- try:
- tmr = int(arg[0])
- time.sleep(tmr)
- activity = _ba.get_foreground_host_activity()
- activity.end_game()
- except:
- return
-"""
-
-
-def quit_call(arg):
-
- if arg == [] or arg == ['']:
- ba.quit()
-
- """
- else:
- try:
- tmr = int(arg[0])
- time.sleep(tmr)
- ba.quit()
- except:
- return
- """
-
-
-def mute_call():
- pass
-
-def un_mute_call():
- pass
-
-
-
-def slow_mo_call():
-
- activity = _ba.get_foreground_host_activity()
-
- if activity.globalsnode.slow_motion != True:
- activity.globalsnode.slow_motion = True
-
- else:
- activity.globalsnode.slow_motion = False
-
-
-
-
-
-def nv_call(arg):
-
- activity = _ba.get_foreground_host_activity()
-
- if arg == [] or arg == ['']:
-
- if activity.globalsnode.tint != (0.5, 0.7, 1.0):
- activity.globalsnode.tint = (0.5, 0.7, 1.0)
- else:
- #will fix this soon
- pass
-
- elif arg[0] == 'off':
- if activity.globalsnode.tint != (0.5, 0.7, 1.0):
- return
- else:
- pass
-
-
-
-def dv_call(arg):
-
- activity = _ba.get_foreground_host_activity()
-
- if arg == [] or arg == ['']:
-
- if activity.globalsnode.tint != (1,1,1):
- activity.globalsnode.tint = (1,1,1)
- else:
- #will fix this soon
- pass
-
- elif arg[0] == 'off':
- if activity.globalsnode.tint != (1,1,1):
- return
- else:
- pass
-
-
-def pause_call():
-
- activity = _ba.get_foreground_host_activity()
-
- if activity.globalsnode.paused != True:
- activity.globalsnode.paused = True
-
- else:
- activity.globalsnode.paused = False
-
-
-def rotate_camera_call():
-
- activity = _ba.get_foreground_host_activity()
-
- if activity.globalsnode.camera_mode != 'rotate':
- activity.globalsnode.camera_mode = 'rotate'
-
- else:
- activity.globalsnode.camera_mode == 'normal'
-
-
-
-
-
-def create_role_call(arg):
- pdata.create_role(arg[0])
-
-
-def add_role_to_player(arg):
- id = sess_players()[int(arg[1])].get_account_id()
- try:
- pdata.add_player_role(arg[0], id)
- except:
- return
-
-def remove_role_from_player(arg):
- id = sess_players()[int(arg[1])].get_account_id()
- try:
- pdata.remove_player_role(arg[0], id)
- except:
- return
-
-
-def change_role_tag_call(arg):
- pdata.change_role_tag(arg[0], arg[1])
-
-
-
-
-
-all_commands = ["changetag","createrole", "addrole", "removerole", "addcommand", "addcmd","removecommand","removecmd","kick","remove","rm","end","next","quit","restart","mute","mutechat","unmute","unmutechat","sm","slow","slowmo","nv","night","dv","day","pause","pausegame","cameraMode","camera_mode","rotate_camera","kill","die","heal","heath","curse","cur","sleep","sp","superpunch","gloves","punch","shield","protect","freeze","ice","unfreeze","thaw","gm","godmode","fly","inv","invisible","hl","headless","creepy","creep","celebrate","celeb","spaz"]
-
-
-
-def add_command_to_role(arg):
- try:
- if arg[1] in all_commands:
- pdata.add_command_role(arg[0], arg[1])
- except:
- return
-
-
-
-def remove_command_to_role(arg):
- try:
- if arg[1] in all_commands:
- pdata.remove_command_role(arg[0], arg[1])
- except:
- return
-
-
-
diff --git a/dist/ba_root/mods/chatHandle/chatCMDS/normal_commands.py b/dist/ba_root/mods/chatHandle/chatCMDS/normal_commands.py
deleted file mode 100644
index 7319664..0000000
--- a/dist/ba_root/mods/chatHandle/chatCMDS/normal_commands.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
-
-from _ba import chatmessage as cmsg, screenmessage as smsg
-from .handlers import sess_players
-import ba, _ba
-
-cmnds = ['me', 'list', 'uniqeid']
-
-cmnd_aliases = ['stats', 'score', 'rank', 'myself', 'l', 'id', 'pb-id', 'pb', 'accountid']
-
-
-def exec_cmd(cmnd, arg, clid, pbid):
-
- if cmnd in ['me', 'stats', 'score', 'rank', 'myself']:
- stats_call()
-
- elif cmnd in ['list', 'l']:
- list_call(clid)
-
- elif cmnd in ['uniqeid', 'id', 'pb-id', 'pb' , 'accountid']:
- show_id_call(arg, pbid, clid)
-
-
-
-
-
-def stats_call():
- pass
-
-
-
-def list_call(clid):
- seprator = '______________________________'
- lst = u'{0:^16}{1:^15}{2:^10}'.format('name', 'client_id' , 'player_id') + f'\n{seprator}\n'
-
- for i in sess_players():
- lst += u'{0:^16}{1:^15}{2:^10}\n'.format(i.getname(icon = False), str(i.inputdevice.client_id), str(i.id))
- smsg(lst, color = (0,2.55,2.55), transient = True , clients = [clid])
-
-
-
-def show_id_call(arg, acid, clid):
- if arg == [] or arg == ['']:
- cmsg(f'Your account id is {acid} ')
- else:
- try:
- rq_client = sess_players()[int(arg[0])]
- name = rq_client.getname(full=True , icon=True)
- acid = rq_client.get_account_id()
- smsg(f" {name}'s account id is '{acid}' ", color = (0,2.55,2.55), transient = True , clients = [clid])
- except:
- return
-
-
\ No newline at end of file
diff --git a/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py b/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py
new file mode 100644
index 0000000..b87ad50
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py
@@ -0,0 +1,6 @@
+# Released under the MIT License. See LICENSE for details.
+import ba, _ba
+
+
+def isAbuse(msg):
+ pass
\ No newline at end of file
diff --git a/dist/ba_root/mods/chatHandle/chatFilter/FilterWords.py b/dist/ba_root/mods/chatHandle/chatFilter/FilterWords.py
new file mode 100644
index 0000000..5ab7732
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/chatFilter/FilterWords.py
@@ -0,0 +1,1012 @@
+"""
+those worlds will get filterd in chat
+become dank add your worlds O_O
+
+ """
+
+filtered_words = [
+'kamine'
+'bitch'
+'erotic'
+'shit'
+'bra'
+'nipple'
+'jhaat'
+'mc'
+'bhosdika'
+'baap'
+'aulad'
+'wtf'
+'chood'
+'chhod'
+'bhadwe'
+'bhadve'
+'behnchod'
+'gaand'
+'baap'
+'mf'
+'fuck'
+'mc'
+'bc'
+'lawde'
+'chutiyamother'
+'laude'
+'chutiye'
+'maderchod'
+'maderchhod'
+'maderchood'
+'madarchod'
+'madarchhod'
+'chut'
+'bhen'
+'bsdk'
+'kaminey'
+'gaand'
+'gand'
+'tatti'
+'pennis'
+'fucker'
+'madarchod'
+'machod'
+'chood'
+'machod'
+'fuck'
+'fck'
+'fkuc'
+'fuk'
+'sex'
+'sexy'
+'nigga'
+'asshole'
+'bc'
+'ass'
+'fuckoff'
+'cock'
+'hardcore'
+'leabian'
+'motherfuck'
+'lund'
+'dick'
+'dickhead'
+'nigga'
+'orgasm'
+'porn'
+'slut'
+'viagra'
+'whore'
+'dildo'
+'pussy'
+'piss'
+'hijdemadar'
+'madarchodd'
+'chodd'
+'randi'
+'randiii'
+'lund'
+'lundd'
+'lode'
+'laude'
+'chuss'
+'land'
+'choot'
+'chut'
+'maa'
+'randy'
+'madarchodd'
+'nanga'
+'nangi'
+'benchod'
+'bancho'
+'behnchod'
+'gaand'
+'lundd'
+'shit'
+'ass'
+'asshole'
+'ass'
+'asa'
+'ass'
+'asshole'
+'ahole'
+'anal'
+'anal impaler'
+'anal leakage'
+'analprobe'
+'anus'
+'arsehole'
+'ass'
+'ass fuck'
+'ass fuck'
+'ass hole'
+'assbag'
+'assbandit'
+'assbang'
+'assbanged'
+'assbanger'
+'assbangs'
+'assbite'
+'assclown'
+'asscock'
+'asscracker'
+'asses'
+'assface'
+'assfaces'
+'assfuck'
+'assfucker'
+'assfucker'
+'assfukka'
+'assgoblin'
+'asshole'
+'asshat'
+'asshat'
+'asshead'
+'asshoie'
+'asshole'
+'assholes'
+'asshopper'
+'assjabber'
+'assjacker'
+'asslick'
+'asslicker'
+'assmaster'
+'assshole'
+'asssucker'
+'asswad'
+'asswhole'
+'asswipe'
+'asswipes'
+'erotic'
+'azz'
+'bitch'
+'boobs'
+'bitch'
+'bitch'
+'licking'
+'sack'
+' sucking'
+'ballbag'
+'balls'
+'ballsack'
+'bangbros'
+'bastard'
+'bastardo'
+'bastards'
+'beotch'
+'bitch'
+'biatch'
+'big black'
+'breasts'
+'big tits'
+'bigtits'
+'bitch'
+'bitch tit'
+'bitch tit'
+'bitchass'
+'bitched'
+'bitcher'
+'bitchers'
+'bitches'
+'bitchin'
+'bitching'
+'bitchtits'
+'bitchy'
+'black cock'
+'blonde action'
+'blonde on blonde action'
+'bloody hell'
+'blow job'
+'blow me'
+'blow your load'
+'blowjob'
+'blowjobs'
+'boner'
+'boners'
+'boob'
+'boobies'
+'boobs'
+'booby'
+'booger'
+'bookie'
+'boong'
+'booobs'
+'boooobs'
+'booooobs'
+'booooooobs'
+'bootee'
+'bootie'
+'booty'
+'booty call'
+'breasts'
+'breeder'
+'brotherfucker'
+'bull shit'
+'bullshit'
+'bullshits'
+'bullshitted'
+'bullturds'
+'bung'
+'bung hole'
+'bunghole'
+'bunny fucker'
+'bust a load'
+'bust a load'
+'busty'
+'butt'
+'butt fuck'
+'butt fuck'
+'butt plug'
+'buttcheeks'
+'buttfuck'
+'buttfucka'
+'buttfucker'
+'butthole'
+'buttmuch'
+'buttmunch'
+'buttpirate'
+'buttplug'
+'cock'
+'cock'
+'cunt'
+'cock'
+'cock'
+'cocksucker'
+'chichi man'
+'chick with a dick'
+'childfucker'
+'chode'
+'chodes'
+'clit'
+'clit licker'
+'clit licker'
+'clitface'
+'clitfuck'
+'clitoris'
+'clitorus'
+'clits'
+'clitty'
+'clitty litter'
+'clitty litter'
+'clusterfuck'
+'cnut'
+'cocain'
+'cocaine'
+'coccydynia'
+'cock'
+'cock'
+'cock pocket'
+'cock pocket'
+'cock snot'
+'cock snot'
+'cock sucker'
+'cockass'
+'cockbite'
+'cockblock'
+'cockburger'
+'cockeye'
+'cockface'
+'cockfucker'
+'cockhead'
+'cockholster'
+'cockjockey'
+'cockknocker'
+'cockknoker'
+'cocklump'
+'cockmaster'
+'cockmongler'
+'cockmongruel'
+'cockmonkey'
+'cockmunch'
+'cockmuncher'
+'cocknose'
+'cocknugget'
+'cocks'
+'cockshit'
+'cocksmith'
+'cocksmoke'
+'cocksmoker'
+'cocksniffer'
+'cocksuck'
+'cocksuck'
+'cocksucked'
+'cocksucked'
+'cocksucker'
+'cocksucker'
+'cocksuckers'
+'cocksucking'
+'cocksucks'
+'cocksucks'
+'cocksuka'
+'cocksukka'
+'cockwaffle'
+'condom'
+'coochie'
+'coochy'
+'corksucker'
+'cornhole'
+'cornhole'
+'corp whore'
+'corp whore'
+'crackhead'
+'crackwhore'
+'crap'
+'crappy'
+'creampie'
+'crikey'
+'cripple'
+'crotte'
+'cum'
+'cum chugger'
+'cum chugger'
+'cum dumpster'
+'cum dumpster'
+'cum freak'
+'cum freak'
+'cum guzzler'
+'cum guzzler'
+'cumbubble'
+'cumdump'
+'cumdump'
+'cumdumpster'
+'cumguzzler'
+'cumjockey'
+'cummer'
+'cummin'
+'cumming'
+'cums'
+'cumshot'
+'cumshots'
+'cumslut'
+'cumstain'
+'cunillingus'
+'cunnie'
+'cunnilingus'
+'cunny'
+'cunt'
+'cunt'
+'cunt hair'
+'cunt hair'
+'cuntass'
+'cuntbag'
+'cuntbag'
+'cuntface'
+'cunthole'
+'cunthunter'
+'cuntlick'
+'cuntlick'
+'cuntlicker'
+'cuntlicker'
+'cuntlicking'
+'cuntlicking'
+'cuntrag'
+'cunts'
+'cuntsicle'
+'cuntsicle'
+'cuntslut'
+'cuntstruck'
+'cuntstruck'
+'cyberfuc'
+'cyberfuck'
+'cyberfuck'
+'cyberfucked'
+'cyberfucked'
+'cyberfucker'
+'cyberfuckers'
+'cyberfucking'
+'cyberfucking'
+'douche'
+'douche'
+'dick'
+'dildo'
+'dildo'
+'darkie'
+'rape'
+'daterape'
+'dawgiestyle'
+'deep throat'
+'deepthroat'
+'dick'
+'dick head'
+'dick hole'
+'dick hole'
+'dick shy'
+'dick shy'
+'dickbag'
+'dickbeaters'
+'dickdipper'
+'dickface'
+'dickflipper'
+'dickfuck'
+'dickfucker'
+'dickhead'
+'dickheads'
+'dickhole'
+'dickish'
+'dickish'
+'dickjuice'
+'dickmilk'
+'dicks'
+'dicksucker'
+'dicksucking'
+'dicktickler'
+'dickwad'
+'dildo'
+'dildos'
+'dog style'
+'dogfucker'
+'doggie style'
+'doggiestyle'
+'doggiestyle'
+'doggin'
+'dogging'
+'doggy style'
+'doggystyle'
+'doggystyle'
+'double penetration'
+'douche'
+'douche'
+'dumass'
+'dumb ass'
+'dumbass'
+'dumbasses'
+'dumbcunt'
+'dumbfuck'
+'dumbshit'
+'dummy'
+'dumshit'
+'eat a dick'
+'eat a dick'
+'eat hair pie'
+'eat hair pie'
+'eat my ass'
+'ejaculate'
+'ejaculated'
+'ejaculates'
+'ejaculates'
+'ejaculating'
+'ejaculating'
+'ejaculatings'
+'ejaculation'
+'ejakulate'
+'erect'
+'erection'
+'erotic'
+'erotism'
+'f u c k'
+'f u c k e r'
+'fuck'
+'fuck'
+'fack'
+'fag'
+'fagbag'
+'fagfucker'
+'fagg'
+'fagged'
+'fagging'
+'faggit'
+'faggitt'
+'faggot'
+'faggotcock'
+'faggots'
+'faggs'
+'fagot'
+'fagots'
+'fatass'
+'fcuk'
+'fcuker'
+'fcuking'
+'fecal'
+'feck'
+'fecker'
+'fcuk'
+'fingerbang'
+'fingerfuck'
+'fingerfuck'
+'fingerfucked'
+'fingerfucked'
+'fingerfucker'
+'fingerfucker'
+'fingerfuckers'
+'fingerfucking'
+'fingerfucking'
+'fingerfucks'
+'fingerfucks'
+'fingering'
+'fuc'
+'fuck'
+'fuck'
+'fuck'
+'fuck buttons'
+'fuck hole'
+'fuck hole'
+'fuck off'
+'fuck puppet'
+'fuck puppet'
+'fuck trophy'
+'fuck trophy'
+'fuck yo mama'
+'fuck yo mama'
+'fuck you'
+'fucka'
+'fuckass'
+'fuckass'
+'fuckass'
+'fuckbag'
+'fuckbitch'
+'fuckbitch'
+'fuckboy'
+'fuckbrain'
+'fuckbutt'
+'fuckbutter'
+'fucked'
+'fuckedup'
+'fucker'
+'fuckers'
+'fuckersucker'
+'fuckface'
+'fuckhead'
+'fuckheads'
+'fuckhole'
+'fuckin'
+'fucking'
+'fuckings'
+'fuckingshitmotherfucker'
+'fuckme'
+'fuckme'
+'fuckmeat'
+'fuckmeat'
+'fucknugget'
+'fucknut'
+'fucknutt'
+'fuckoff'
+'fucks'
+'fuckstick'
+'fucktard'
+'fucktard'
+'fucktards'
+'fucktart'
+'fucktoy'
+'fucktoy'
+'fucktwat'
+'fuckup'
+'fuckwad'
+'fuckwhit'
+'fuckwit'
+'fuckwitt'
+'fudge packer'
+'fudgepacker'
+'fuk'
+'fuker'
+'fukker'
+'fukkers'
+'fukkin'
+'fuks'
+'fukwhit'
+'fukwit'
+'fuq'
+'fux'
+'fuxor'
+'fvck'
+'fxck'
+'gae'
+'gang bang'
+'gangbang'
+'gangbang'
+'gangbang'
+'gangbanged'
+'gangbangs'
+'ganja'
+'gash'
+'gassy ass'
+'gassy ass'
+'gay'
+'gay sex'
+'gayass'
+'gaybob'
+'gaydo'
+'gayfuck'
+'gayfuckist'
+'gaylord'
+'gays'
+'gaysex'
+'gaytard'
+'gaywad'
+'gender bender'
+'genitals'
+'gey'
+'god damn'
+'godamn'
+'godamnit'
+'goddam'
+'goddam'
+'goddammit'
+'goddamn'
+'goddamned'
+'goddamned'
+'goddamnit'
+'godsdamn'
+'gtfo'
+'homo'
+'homo'
+'hand job'
+'handjob'
+'hard core'
+'hard on'
+'hardcore'
+'hardcoresex'
+'hentai'
+'herp'
+'herpes'
+'herpy'
+'heshe'
+'heshe'
+'hircismus'
+'hitler'
+'hiv'
+'hoar'
+'hoare'
+'hobag'
+'hoe'
+'hoer'
+'holy shit'
+'homo'
+'homo'
+'homodumbshit'
+'homoerotic'
+'homoey'
+'hore'
+'horniest'
+'horny'
+'hot carl'
+'hot chick'
+'hotsex'
+'how wtf'
+'inbred'
+'incest'
+'injun'
+'intercourse'
+'jack off'
+'jackass'
+'jackasses'
+'jackhole'
+'jackoff'
+'jackoff'
+'jaggi'
+'jagoff'
+'jail bait'
+'jailbait'
+'jap'
+'japs'
+'jelly donut'
+'jerk'
+'jerk off'
+'jerkoff'
+'jerkass'
+'jerked'
+'jerkoff'
+'jerkoff'
+'kock'
+'kondum'
+'kondums'
+'kooch'
+'kooches'
+'kootch'
+'kraut'
+'kum'
+'kummer'
+'kumming'
+'kums'
+'kunilingus'
+'kunja'
+'kunt'
+'lesbian'
+'lesbians'
+'lesbo'
+'lesbos'
+'lez'
+'lezza'
+'lesbo'
+'lovemaking'
+'lube'
+'lust'
+'lusting'
+'lusty'
+'mofo'
+'mofo'
+'masterbate'
+'masterbe'
+'masterbate'
+'mafugly'
+'mafugly'
+'make me come'
+'male squirting'
+'mams'
+'masterbe'
+'masterbate'
+'masterbate'
+'masterbate'
+'masterbate'
+'masterbate'
+'masterbating'
+'masterbation'
+'masterbations'
+'masturbate'
+'masturbating'
+'masturbation'
+'mcfagget'
+'menstruate'
+'menstruation'
+'meth'
+'mfucking'
+'milf'
+'moron'
+'mothafuck'
+'mothafucka'
+'mothafuckas'
+'mothafuckaz'
+'mothafucked'
+'mothafucked'
+'mothafucker'
+'mothafuckers'
+'mothafuckin'
+'mothafucking'
+'mothafucking'
+'mothafuckings'
+'mothafucks'
+'mother fucker'
+'mother fucker'
+'motherfuck'
+'motherfucka'
+'motherfucked'
+'motherfucker'
+'motherfuckers'
+'motherfuckin'
+'motherfucking'
+'motherfuckings'
+'motherfuckka'
+'motherfucks'
+'muthafecker'
+'muthafuckker'
+'mutherfucker'
+'nigga'
+'nigger'
+'naked'
+'nigger'
+'niggah'
+'nigga'
+'nude'
+'nudity'
+'numbnuts'
+'nut butter'
+'nut butter'
+'nut sack'
+'nutsack'
+'nutter'
+'nympho'
+'nymphomania'
+'octopussy'
+'orgasim'
+'orgasims'
+'orgasm'
+'orgasmic'
+'orgasms'
+'orgies'
+'orgy'
+'ovary'
+'ovum'
+'ovums'
+'pussy'
+'porn'
+'pantie'
+'panties'
+'panty'
+'pawn'
+'pee'
+'peepee'
+'penetrate'
+'penetration'
+'penial'
+'penile'
+'penis'
+'penisbanger'
+'penisfucker'
+'penispuffer'
+'perversion'
+'phallicsex'
+'phonesex'
+'phuck'
+'phuk'
+'phuked'
+'phuking'
+'phukked'
+'phukking'
+'phuks'
+'phuq'
+'piece of shit'
+'pigfucker'
+'pissed'
+'pissed off'
+'pisser'
+'pissers'
+'pisses'
+'pisses'
+'pissflaps'
+'pissin'
+'pissin'
+'pissing'
+'pissoff'
+'pissoff'
+'pissoff'
+'pisspig'
+'poop'
+'poop chute'
+'poopchute'
+'poopuncher'
+'porch monkey'
+'porchmonkey'
+'porn'
+'porno'
+'pornography'
+'pornos'
+'psycho'
+'puss'
+'pusse'
+'pussi'
+'pussies'
+'pussy'
+'pussy fart'
+'pussy fart'
+'pussy palace'
+'pussy palace'
+'pussylicking'
+'pussypounder'
+'pussys'
+'raging boner'
+'rape'
+'raped'
+'raper'
+'raping'
+'rapist'
+'rectal'
+'rectum'
+'rectus'
+'reefer'
+'reetard'
+'reich'
+'renob'
+'retard'
+'retarded'
+'s hit'
+'shit'
+'scum'
+'seaman'
+'seamen'
+'seduce'
+'seks'
+'semen'
+'sex'
+'sexo'
+'sexual'
+'sexy'
+'shit'
+'shit'
+'shit'
+'shit'
+'shaved pussy'
+'shemale'
+'shit'
+'shit'
+'shit'
+'shit ass'
+'shit fucker'
+'shit fucker'
+'shitass'
+'shitbag'
+'shitbagger'
+'shitblimp'
+'shitbrains'
+'shitbreath'
+'shitcanned'
+'shitcunt'
+'shitdick'
+'shit'
+'shiteater'
+'shited'
+'shitey'
+'shitface'
+'shitfaced'
+'shitfuck'
+'shitfull'
+'shithead'
+'shitheads'
+'shithole'
+'shithouse'
+'shiting'
+'shitings'
+'shits'
+'shitspitter'
+'shitstain'
+'shitt'
+'shitted'
+'shitter'
+'shitters'
+'shitters'
+'shittier'
+'shittiest'
+'shitting'
+'shittings'
+'shitty'
+'slut'
+'slut bucket'
+'slut bucket'
+'slutbag'
+'slutdumper'
+'slutkiss'
+'sluts'
+'son of a bitch'
+'son of a motherless goat'
+'son of a whore'
+'sonofabitch'
+'sperm'
+'stfu'
+'suck'
+'suckass'
+'sucked'
+'sucking'
+'sucks'
+'tit'
+'titties'
+'titties'
+'testical'
+'testicle'
+'testis'
+'threesome'
+'throating'
+'tied up'
+'tight white'
+'tinkle'
+'tit'
+'tit wank'
+'tit wank'
+'titfuck'
+'titi'
+'tities'
+'tits'
+'titt'
+'titties'
+'tittiefucker'
+'titties'
+'titty'
+'tittyfuck'
+'tittyfucker'
+'tittywank'
+'tongue in a'
+'transsexual' 'two fingers'
+'two fingers with tongue'
+'undressing'
+'urinal'
+'urine'
+'urophilia'
+'vagina'
+'viagra'
+'vibrator'
+'whore'
+'whoreface'
+'whore'
+'whorealicious'
+'whorebag'
+'whored'
+'whoreface'
+'whorehopper'
+'whorehouse'
+'whores'
+'whoring'
+'wigger'
+'wtf'
+'xrated'
+'xrated'
+'xxx'
+'what the fuck'
+'the fuck'
+'tf'
+]
+
diff --git a/dist/ba_root/mods/chatHandle/chatSpam/chatfilter.py b/dist/ba_root/mods/chatHandle/chatSpam/CheackSpam.py
similarity index 81%
rename from dist/ba_root/mods/chatHandle/chatSpam/chatfilter.py
rename to dist/ba_root/mods/chatHandle/chatSpam/CheackSpam.py
index bf3dea9..9d6db0a 100644
--- a/dist/ba_root/mods/chatHandle/chatSpam/chatfilter.py
+++ b/dist/ba_root/mods/chatHandle/chatSpam/CheackSpam.py
@@ -1,3 +1,3 @@
# Released under the MIT License. See LICENSE for details.
-def isAbuse():
+def isspam():
return
\ No newline at end of file
diff --git a/dist/ba_root/mods/chatHandle/handlechat.py b/dist/ba_root/mods/chatHandle/handlechat.py
index 2f6fc5a..0bc73ef 100644
--- a/dist/ba_root/mods/chatHandle/handlechat.py
+++ b/dist/ba_root/mods/chatHandle/handlechat.py
@@ -1,26 +1,20 @@
-# Released under the MIT License. See LICENSE for details.
-from playersData import pdata
-from chatHandle.chatCMDS import chatcmd
-#from chatFilter import chatfilter
-import ba,_ba
-
-def public_id(client_id):
- rost=_ba.get_game_roster()
- for client in rost:
- if client['client_id']==client_id:
- return client['account_id']
- return None
-
-def filter_chat_message(msg,client_id):
- if msg.startswith("/"):
- return chatcmd.cmd(msg,client_id)
- return msg
-
-"""
- if chatfilter.isAbuse(msg):
- pdata.warn(public_id(client_id))
- return None
- return msg
-"""
-
-
+# Released under the MIT License. See LICENSE for details.
+
+from PlayersData import pdata
+from ChatHandle.ChatCommands import Main
+
+import ba, _ba
+
+
+
+def filter_chat_message(msg, client_id):
+ if msg.startswith("/"):
+ return Main.Command(msg, client_id)
+ return msg
+
+"""
+ if chatfilter.isAbuse(msg):
+ pdata.warn(public_id(client_id))
+ return None
+ return msg
+"""
\ No newline at end of file
diff --git a/dist/ba_root/mods/chatHandle/temporary.txt b/dist/ba_root/mods/chatHandle/temporary.txt
new file mode 100644
index 0000000..24c5e8b
--- /dev/null
+++ b/dist/ba_root/mods/chatHandle/temporary.txt
@@ -0,0 +1,14 @@
+###### remaining
+
+
+mute / unmute
+spaz
+me
+stats
+nv / dv
+replies for coamd like ' created role Pranav69 successfully'
+some dirt here there
+
+
+chat spam
+chat filter
diff --git a/dist/ba_root/mods/custom_hooks.py b/dist/ba_root/mods/custom_hooks.py
index c3621ff..dada884 100644
--- a/dist/ba_root/mods/custom_hooks.py
+++ b/dist/ba_root/mods/custom_hooks.py
@@ -1,8 +1,7 @@
-
+from ChatHandle import HandleChat
def filter_chat_message(msg,client_id):
- from chatHandle import handlechat
- return handlechat.filter_chat_message(msg,client_id)
+ return HandleChat.filter_chat_message(msg,client_id)
def on_app_launch():
diff --git a/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.opt-1.pyc b/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.opt-1.pyc
index 4dbd2f2..bfb4940 100644
Binary files a/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.opt-1.pyc and b/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.pyc b/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.pyc
deleted file mode 100644
index 22ece17..0000000
Binary files a/dist/ba_root/mods/playersData/__pycache__/__init__.cpython-38.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-38.opt-1.pyc b/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-38.opt-1.pyc
index f0a52a3..8d353a4 100644
Binary files a/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-38.opt-1.pyc and b/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-38.opt-1.pyc differ
diff --git a/dist/ba_root/mods/playersData/roles.json b/dist/ba_root/mods/playersData/roles.json
index d34f3e4..75865f8 100644
--- a/dist/ba_root/mods/playersData/roles.json
+++ b/dist/ba_root/mods/playersData/roles.json
@@ -8,6 +8,10 @@
],
"commands": [
"createrole",
+ "add",
+ "spectators",
+ "lobbytime",
+ "whitelist",
"addrole",
"removerole",
"addcommand",
@@ -79,7 +83,8 @@
"changetag"
],
"ids": [
- "pb-IF48VgWkBFQ"
+ "pb-IF48VWkBFQ",
+ "None"
]
},
"test69": {
diff --git a/dist/ba_root/mods/privateserver.py b/dist/ba_root/mods/privateserver.py
index 8367c3b..8f62f33 100644
--- a/dist/ba_root/mods/privateserver.py
+++ b/dist/ba_root/mods/privateserver.py
@@ -1,27 +1,42 @@
-"""Define a simple example plugin."""
+"""
+Private Server whitelist by Mr.Smoothy
+
+* don't dare to remove credits or I will bite you
+
+GitHub : https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server
+"""
# ba_meta require api 6
-
-# Private Server whitelist by Mr.Smoothy
from __future__ import annotations
-
from typing import TYPE_CHECKING
+from ba._enums import TimeType
-import ba,json,_ba,time
+import ba, json, _ba, time, datetime
if TYPE_CHECKING:
pass
-import datetime
-from ba._enums import TimeType
-whitelist_on=True # change it by chat commands for by editing here
-spectators=False # ,, ,, ,, ,, False means spectating not allowed
-whitelist={} # dont change
-lobbychecktime=3 # time in seconds, to check lobby players ... increase time ,for more time unwanted players can watch match
- # decrease time , kick them fast , but can also give some lagg to the server , adjust yourself acrd. to cpu power
+whitelist_on = True
+""" Change It By Chat Commands For By Editing Here """
-admins=['pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE'] # dirty admin system , for now , until we get good working chat commands
+
+spectators = False
+""" False Means Spectating Not Allowed """
+
+
+whitelist = {}
+""" Dont change """
+
+
+lobbychecktime = 3
+"""
+Time in seconds, to check lobby players ... increase time ,for more time unwanted players can watch match
+Decrease time , kick them fast , but can also give some lagg to the server , adjust yourself acrd. to cpu power """
+
+
+admins = ['pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE']
+"""Dirty admin system , for now , until we get good working chat commands """
def inWhiteList(id):
diff --git a/dist/ba_root/mods/setting.json b/dist/ba_root/mods/setting.json
index e80165b..935d8b9 100644
--- a/dist/ba_root/mods/setting.json
+++ b/dist/ba_root/mods/setting.json
@@ -4,6 +4,15 @@
"spectators": false,
"lobbychecktime": 3
},
+
+
+
+ "ChatCommands": {
+ "BrodcastCommand": true
+ },
+
+
+
"textonmap": {
"top watermark": "Welcome to server \n ip 192.168.0.1",
"bottom left watermark": "join discord for fun",
@@ -13,6 +22,9 @@
"message 3"
]
},
+
+
+
"enabletags": true,
"enablerank": true,
"enableeffects": false
diff --git a/dist/ba_root/mods/stats/__pycache__/mystats.cpython-38.opt-1.pyc b/dist/ba_root/mods/stats/__pycache__/mystats.cpython-38.opt-1.pyc
deleted file mode 100644
index 482aac2..0000000
Binary files a/dist/ba_root/mods/stats/__pycache__/mystats.cpython-38.opt-1.pyc and /dev/null differ
diff --git a/dist/ba_root/mods/stats/mystats.py b/dist/ba_root/mods/stats/mystats.py
deleted file mode 100644
index 8e52ca5..0000000
--- a/dist/ba_root/mods/stats/mystats.py
+++ /dev/null
@@ -1,224 +0,0 @@
-damage_data = {}
-#Don't touch the above line
-"""
-mystats module for BombSquad version 1.5.29
-Provides functionality for dumping player stats to disk between rounds.
-"""
-ranks=[]
-import threading,json,os,urllib.request,ba,_ba,setting
-from ba._activity import Activity
-from ba._music import setmusic, MusicType
-from ba._enums import InputType, UIScale
-# False-positive from pylint due to our class-generics-filter.
-from ba._player import EmptyPlayer # pylint: disable=W0611
-from ba._team import EmptyTeam # pylint: disable=W0611
-from typing import Any, Dict, Optional
-from ba._lobby import JoinInfo
-from ba import _activitytypes as ba_actypes
-from ba._activitytypes import *
-our_settings = setting.get_settings_data()
-# where our stats file and pretty html output will go
-base_path = os.path.join(_ba.env()['python_directory_user'],"stats" + os.sep)
-statsfile = base_path + 'stats.json'
-htmlfile = base_path + 'stats_page.html'
-table_style = "{width:100%;border: 3px solid black;border-spacing: 5px;border-collapse:collapse;text-align:center;background-color:#fff}"
-heading_style = "{border: 3px solid black;text-align:center;}"
-html_start = f'''
-
-
-
- Test Server
-
-
-
- Top 200 Players
-
-
- | Rank |
- Name |
- Score |
- Kills |
- Deaths |
- Games Played |
-
-'''
-# Total Damage | #removed this line as it isn't crt data
-def refreshStats():
- # lastly, write a pretty html version.
- # our stats url could point at something like this...
- f=open(statsfile)
- stats = json.loads(f.read())
-
- f=open(htmlfile, 'w')
- f.write(html_start)
- entries = [(a['scores'], a['kills'], a['deaths'], a['games'], a['name_html'], a['aid']) for a in stats.values()]
- # this gives us a list of kills/names sorted high-to-low
- entries.sort(reverse=True)
- rank = 0
- toppers = {}
- pStats = stats
- toppersIDs=[]
- _ranks=[]
- for entry in entries:
- if True:
- rank += 1
- scores = str(entry[0])
- kills = str(entry[1])
- deaths = str(entry[2])
- games = str(entry[3])
- name = str(entry[4])
- aid = str(entry[5])
- if rank < 6: toppersIDs.append(aid)
- #The below kd and avg_score will not be added to website's html document, it will be only added in stats.json
- try:
- kd = str(float(kills) / float(deaths))
- kd_int = kd.split('.')[0]
- kd_dec = kd.split('.')[1]
- p_kd = kd_int + '.' + kd_dec[:3]
- except Exception:
- p_kd = "0"
- try:
- avg_score = str(float(scores) / float(games))
- avg_score_int = avg_score.split('.')[0]
- avg_score_dec = avg_score.split('.')[1]
- p_avg_score = avg_score_int + '.' + avg_score_dec[:3]
- except Exception:
- p_avg_score = "0"
- if damage_data and aid in damage_data:
- dmg = damage_data[aid]
- dmg = str(str(dmg).split('.')[0] + '.' + str(dmg).split('.')[1][:3])
- else: dmg = 0
-
- _ranks.append(aid)
-
- pStats[str(aid)]["rank"] = int(rank)
- pStats[str(aid)]["scores"] = int(scores)
- pStats[str(aid)]["total_damage"] += float(dmg) #not working properly
- pStats[str(aid)]["games"] = int(games)
- pStats[str(aid)]["kills"] = int(kills)
- pStats[str(aid)]["deaths"] = int(deaths)
- pStats[str(aid)]["kd"] = float(p_kd)
- pStats[str(aid)]["avg_score"] = float(p_avg_score)
-
- if rank < 201:
- #{str(dmg)} | #removed this line as it isn't crt data
- f.write(f'''
-
- | {str(rank)} |
- {str(name)} |
- {str(scores)} |
- {str(kills)} |
- {str(deaths)} |
- {str(games)} |
-
''')
- f.write('''
-
-
-''')
- f.close()
- global ranks
- ranks=_ranks
-
- f2 = open(statsfile, "w")
- f2.write(json.dumps(pStats, indent=4))
- f2.close()
-
- from playersData import pdata
- pdata.update_toppers(toppersIDs)
-
-def update(score_set):
- """
- Given a Session's ScoreSet, tallies per-account kills
- and passes them to a background thread to process and
- store.
- """
- # look at score-set entries to tally per-account kills for this round
-
- account_kills = {}
- account_deaths = {}
- account_scores = {}
-
- for p_entry in score_set.get_records().values():
- account_id = p_entry.player.get_account_id()
- if account_id is not None:
- account_kills.setdefault(account_id, 0) # make sure exists
- account_kills[account_id] += p_entry.accum_kill_count
- account_deaths.setdefault(account_id, 0) # make sure exists
- account_deaths[account_id] += p_entry.accum_killed_count
- account_scores.setdefault(account_id, 0) # make sure exists
- account_scores[account_id] += p_entry.accumscore
- # Ok; now we've got a dict of account-ids and kills.
- # Now lets kick off a background thread to load existing scores
- # from disk, do display-string lookups for accounts that need them,
- # and write everything back to disk (along with a pretty html version)
- # We use a background thread so our server doesn't hitch while doing this.
- print(account_kills)
- print(account_scores)
- if account_scores:
- UpdateThread(account_kills, account_deaths, account_scores).start()
-
-class UpdateThread(threading.Thread):
- def __init__(self, account_kills, account_deaths, account_scores):
- threading.Thread.__init__(self)
- self._account_kills = account_kills
- self.account_deaths = account_deaths
- self.account_scores = account_scores
- print("init thread")
- def run(self):
- # pull our existing stats from disk
- print("run thead")
- try:
- if os.path.exists(statsfile):
- with open(statsfile) as f:
- stats = json.loads(f.read())
- except:
- stats={}
-
- # now add this batch of kills to our persistant stats
- for account_id, kill_count in self._account_kills.items():
- # add a new entry for any accounts that dont have one
- if account_id not in stats:
- # also lets ask the master-server for their account-display-str.
- # (we only do this when first creating the entry to save time,
- # though it may be smart to refresh it periodically since
- # it may change)
- '''url = 'http://bombsquadgame.com/accountquery?id=' + account_id
- response = json.loads(
- urllib.request.urlopen(urllib.Request(url)).read())
- print('response variable from mystats.py line 183:')
- print(response)
- name_html = response['name_html']'''
- stats[account_id] = {'rank': 0,
- 'name_html': str(account_id),
- 'scores': 0,
- 'total_damage': 0,
- 'kills': 0,
- 'deaths': 0,
- 'games': 0,
- 'kd': 0,
- 'avg_score': 0,
- 'aid': str(account_id)}
- # now increment their kills whether they were already there or not
- stats[account_id]['kills'] += kill_count
- stats[account_id]['deaths'] += self.account_deaths[account_id]
- stats[account_id]['scores'] += self.account_scores[account_id]
- # also incrementing the games played and adding the id
- stats[account_id]['games'] += 1
- stats[account_id]['aid'] = str(account_id)
- # dump our stats back to disk
- tempppp = None
- from datetime import datetime
- with open(statsfile, 'w') as f:
- f.write(json.dumps(stats))
- # aaand that's it! There IS no step 27!
- now = datetime.now()
- update_time = now.strftime("%S:%M:%H - %d %b %y")
- print(f"Added {str(len(self._account_kills))} account's stats entries. || {str(update_time)}")
- refreshStats()
-
-def getRank(acc_id):
- global ranks
- if ranks==[]:
- refreshStats()
- if acc_id in ranks:
- return ranks.index(acc_id)+1
\ No newline at end of file
diff --git a/dist/ba_root/mods/stats/rank.py b/dist/ba_root/mods/stats/rank.py
deleted file mode 100644
index 9b46f9f..0000000
--- a/dist/ba_root/mods/stats/rank.py
+++ /dev/null
@@ -1 +0,0 @@
-# Released under the MIT License. See LICENSE for details.
\ No newline at end of file
diff --git a/dist/ba_root/mods/stats/stats.json b/dist/ba_root/mods/stats/stats.json
deleted file mode 100644
index e0b50f0..0000000
--- a/dist/ba_root/mods/stats/stats.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "pb-IF4VAk4a": {
- "rank": 1,
- "name_html": "pb-IF4VAk4a",
- "scores": 0,
- "total_damage": 0.0,
- "kills": 0,
- "deaths": 0,
- "games": 18,
- "kd": 0.0,
- "avg_score": 0.0,
- "aid": "pb-IF4VAk4a"
- }
-}
\ No newline at end of file
diff --git a/dist/ba_root/mods/stats/stats_page.html b/dist/ba_root/mods/stats/stats_page.html
deleted file mode 100644
index 401181a..0000000
--- a/dist/ba_root/mods/stats/stats_page.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- Test Server
-
-
-
- Top 200 Players
-
-
- | Rank |
- Name |
- Score |
- Kills |
- Deaths |
- Games Played |
-
-
-
- | 1 |
- pb-IF4VAk4a |
- 0 |
- 0 |
- 0 |
- 18 |
-
-
-
-
\ No newline at end of file