mirror of
https://github.com/hypervortex/VH-Bombsquad-Modded-Server-Files
synced 2025-10-16 12:02:51 +00:00
Update servercheck.py
This commit is contained in:
parent
8cb1245312
commit
37e66927f0
1 changed files with 29 additions and 21 deletions
50
dist/ba_root/mods/tools/servercheck.py
vendored
50
dist/ba_root/mods/tools/servercheck.py
vendored
|
|
@ -326,17 +326,21 @@ def on_player_join_server(pbid, player_data, ip, device_id):
|
|||
verify_account(pbid, player_data) # checked for spoofed ids
|
||||
logger.log(
|
||||
f'{pbid} ip: {serverdata.clients[pbid]["lastIP"]} , Device id: {device_id}')
|
||||
if settings["ServerForWhitelistplayers"]["enable"]:
|
||||
check_whitelist_player(clid,pbid)
|
||||
_ba.screenmessage(settings["regularWelcomeMsg"] + " " + device_string,
|
||||
color=(0.60, 0.8, 0.6), transient=True,
|
||||
clients=[clid])
|
||||
notification_manager.player_joined(pbid)
|
||||
if settings["JoinClaim"]:
|
||||
jc.join_claim(device_string, clid, pbid)
|
||||
# notify players
|
||||
if settings["NotifyPlayer"]:
|
||||
check_notify_mongo(clid,pbid)
|
||||
def player_join_logic():
|
||||
if settings["ServerForWhitelistplayers"]["enable"]:
|
||||
check_whitelist_player(clid, pbid)
|
||||
# This logic should only be executed in the main thread
|
||||
ba.screenmessage(settings["regularWelcomeMsg"] + " " + device_string,
|
||||
color=(0.60, 0.8, 0.6), transient=True,
|
||||
clients=[clid])
|
||||
notification_manager.player_joined(pbid)
|
||||
if settings["JoinClaim"]:
|
||||
jc.join_claim(device_string, clid, pbid)
|
||||
# Notify players
|
||||
if settings["NotifyPlayer"]:
|
||||
check_notify_mongo(clid, pbid)
|
||||
# Ensure the logic is executed from the main thread
|
||||
_ba.pushcall(Call(player_join_logic))
|
||||
else:
|
||||
# fetch id for first time.
|
||||
thread = FetchThread(
|
||||
|
|
@ -347,16 +351,20 @@ def on_player_join_server(pbid, player_data, ip, device_id):
|
|||
)
|
||||
|
||||
thread.start()
|
||||
if settings["ServerForWhitelistplayers"]["enable"]:
|
||||
check_whitelist_player(clid,pbid)
|
||||
_ba.screenmessage(settings["firstTimeJoinMsg"], color=(0.6, 0.8, 0.6),
|
||||
transient=True, clients=[clid])
|
||||
notification_manager.player_joined(pbid)
|
||||
if settings["JoinClaim"]:
|
||||
jc.join_claim(device_string, clid, pbid)
|
||||
# notify players
|
||||
if settings["NotifyPlayer"]:
|
||||
check_notify_mongo(clid,pbid)
|
||||
def player_join_logic():
|
||||
if settings["ServerForWhitelistplayers"]["enable"]:
|
||||
check_whitelist_player(clid, pbid)
|
||||
# This logic should only be executed in the main thread
|
||||
_ba.screenmessage(settings["firstTimeJoinMsg"], color=(0.6, 0.8, 0.6),
|
||||
transient=True, clients=[clid])
|
||||
notification_manager.player_joined(pbid)
|
||||
if settings["JoinClaim"]:
|
||||
jc.join_claim(device_string, clid, pbid)
|
||||
# Notify players
|
||||
if settings["NotifyPlayer"]:
|
||||
check_notify_mongo(clid, pbid)
|
||||
# Ensure the logic is executed from the main thread
|
||||
_ba.pushcall(Call(player_join_logic))
|
||||
# pdata.add_profile(pbid,d_string,d_string)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue