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

27 lines
551 B
Python
Raw Normal View History

2021-03-31 13:02:42 +05:30
# Released under the MIT License. See LICENSE for details.
from playersData import pdata
2021-04-07 03:58:40 +05:30
from chatHandle.chatCMDS import chatcmd
2021-04-10 16:33:19 +05:30
#from chatFilter import chatfilter
2021-03-31 13:02:42 +05:30
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)
2021-04-10 16:33:19 +05:30
return msg
2021-03-31 13:02:42 +05:30
2021-04-10 16:33:19 +05:30
"""
2021-03-31 13:02:42 +05:30
if chatfilter.isAbuse(msg):
pdata.warn(public_id(client_id))
return None
return msg
2021-04-10 16:33:19 +05:30
"""
2021-03-31 13:02:42 +05:30
2021-03-31 10:44:01 +05:30