Update servercheck.py

This commit is contained in:
Sarasayed0118 2024-04-20 23:40:50 +05:30 committed by GitHub
parent a8a6d067fa
commit 8cb1245312
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -255,7 +255,6 @@ def on_player_join_server(pbid, player_data, ip, device_id):
color=(1, 0, 0), transient=True,
clients=[clid])
ba.internal.disconnect_client(clid)
_thread.start_new_thread(reportSpam, (pbid,))
return # Exit the function after kicking the player
else:
joincount = 0
@ -541,7 +540,7 @@ def reportSpam(id):
count = profiles[id]["spamCount"]
if now - profiles[id]["lastSpam"] < 2 * 24 * 60 * 60:
count += 1
if count > 5:
if count > 3:
logger.log(id+" auto banned for spamming")
# by default ban for 1 day , change here if you want
pdata.ban_player(id, 1, "auto ban exceed warn count")