FIlter disabled

This commit is contained in:
Luis 2025-02-19 15:16:03 -05:00
parent ea991ddc7a
commit 3f02a444ee
3 changed files with 9 additions and 56 deletions

View file

@ -64,14 +64,14 @@ session_max_players_override = 10
# Options here are 'ffa' (free-for-all), 'teams' and 'coop'
# (cooperative) This value is ignored if you supply a playlist_code
# (see below).
#session_type = "ffa"
session_type = "ffa"
# Playlist-code for teams or free-for-all mode sessions.
# To host your own custom playlists, use the 'share' functionality in the
# playlist editor in the regular version of the game.
# This will give you a numeric code you can enter here to host that
# playlist.
playlist_code = 501330
#playlist_code = 501330
# Alternately, you can embed playlist data here instead of using
# codes. Make sure to set session_type to the correct type for the

View file

@ -24,7 +24,7 @@ def check_permissions(accountid):
def filter(msg, pb_id, client_id):
new_msg = profanity.censor(msg)
new_msg = msg
if new_msg != msg:
bs.broadcastmessage("Don\'t ABUSE!", color=(1, 0, 0), transient=True,
clients=[client_id])
@ -39,57 +39,10 @@ def filter(msg, pb_id, client_id):
if pb_id not in serverdata.clients:
return None
if "lastMsgTime" in serverdata.clients[pb_id]:
count = serverdata.clients[pb_id]["cMsgCount"]
smsgcount = serverdata.clients[pb_id]['cSameMsg']
if now - serverdata.clients[pb_id]["lastMsgTime"] < 8:
count += 1
if count == 2: # when 3 msgs
bs.broadcastmessage("Sending messages too fast, cool down...",
color=(1, 0.40, 0.50), transient=True,
clients=[client_id])
elif count >= 3: # when 4 msgs
bs.broadcastmessage("Don\'t SPAM!", color=(1, 0, 0),
transient=True, clients=[client_id])
if not check_permissions(pb_id):
addWarn(pb_id, client_id)
else:
bs.broadcastmessage("Special role found, Warn BYPASSED!",
color=(0, 1, 0), transient=True,
clients=[client_id])
count = 0
elif now - serverdata.clients[pb_id]["lastMsgTime"] < 20:
# < 30
if serverdata.clients[pb_id]["lastMsg"] == msg:
if len(msg) > 5:
smsgcount += 1
if smsgcount >= 3:
logger.log(pb_id + " | kicked for chat spam")
bs.disconnect_client(client_id)
smsgcount = 0
bs.broadcastmessage("Don\'t SPAM!", color=(1, 0, 0),
transient=True, clients=[client_id])
if not check_permissions(pb_id):
addWarn(pb_id, client_id)
else:
bs.broadcastmessage("Special role found, Warn BYPASSED!",
color=(0, 1, 0), transient=True,
clients=[client_id])
else:
smsgcount = 0
else:
count = 0
smsgcount = 0
serverdata.clients[pb_id]['cMsgCount'] = count
serverdata.clients[pb_id]['lastMsgTime'] = now
serverdata.clients[pb_id]['lastMsg'] = msg
serverdata.clients[pb_id]['cSameMsg'] = smsgcount
else:
serverdata.clients[pb_id]['cMsgCount'] = 0
serverdata.clients[pb_id]['lastMsgTime'] = now
serverdata.clients[pb_id]['lastMsg'] = msg
serverdata.clients[pb_id]['cSameMsg'] = 0
serverdata.clients[pb_id]['cMsgCount'] = 0
serverdata.clients[pb_id]['lastMsgTime'] = now
serverdata.clients[pb_id]['lastMsg'] = msg
serverdata.clients[pb_id]['cSameMsg'] = 0
return new_msg

View file

@ -119,7 +119,7 @@
"Tank Shield PTG": 96
}
},
"enableHitTexts": true,
"enableHitTexts": false,
"enableTagAnimation": true,
"enableTop5effects": true,
"enableeffects": true,
@ -150,7 +150,7 @@
"playlists": {
"elim": 412172,
"epic": 412173,
"ffa": 412175,
"ffa": 501330,
"ffasmash": 412179,
"smash": 412151,
"soccer": 412160,