mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
basic role management and chatcmd
This commit is contained in:
parent
0fd45fb29e
commit
826f433e38
15 changed files with 236 additions and 1 deletions
24
dist/ba_root/mods/chatHandle/handlechat.py
vendored
24
dist/ba_root/mods/chatHandle/handlechat.py
vendored
|
|
@ -1,2 +1,24 @@
|
|||
import playersData
|
||||
# Released under the MIT License. See LICENSE for details.
|
||||
from playersData import pdata
|
||||
from 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)
|
||||
|
||||
if chatfilter.isAbuse(msg):
|
||||
pdata.warn(public_id(client_id))
|
||||
return None
|
||||
return msg
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue