Bombsquad-Ballistica-Modded.../dist/ba_root/mods/chatHandle/handlechat.py

25 lines
549 B
Python
Raw Normal View History

2021-04-17 22:34:48 +05:30
# Released under the MIT License. See LICENSE for details.
2021-04-22 14:54:47 +05:30
from playersData import pdata
from chatHandle.ChatCommands import Main
2021-10-23 15:57:59 +05:30
from tools import Logger
2021-04-17 22:34:48 +05:30
import ba, _ba
def filter_chat_message(msg, client_id):
if msg.startswith("/"):
return Main.Command(msg, client_id)
2021-10-23 15:57:59 +05:30
acid=""
for i in _ba.get_game_roster():
if i['client_id'] == client_id:
acid = i['account_id']
Logger.log(acid+" | "+msg,"chat")
2021-04-17 22:34:48 +05:30
return msg
"""
if chatfilter.isAbuse(msg):
pdata.warn(public_id(client_id))
return None
return msg
"""