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
14
dist/ba_root/mods/tools/servercheck.py
vendored
14
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
|
verify_account(pbid, player_data) # checked for spoofed ids
|
||||||
logger.log(
|
logger.log(
|
||||||
f'{pbid} ip: {serverdata.clients[pbid]["lastIP"]} , Device id: {device_id}')
|
f'{pbid} ip: {serverdata.clients[pbid]["lastIP"]} , Device id: {device_id}')
|
||||||
|
def player_join_logic():
|
||||||
if settings["ServerForWhitelistplayers"]["enable"]:
|
if settings["ServerForWhitelistplayers"]["enable"]:
|
||||||
check_whitelist_player(clid, pbid)
|
check_whitelist_player(clid, pbid)
|
||||||
_ba.screenmessage(settings["regularWelcomeMsg"] + " " + device_string,
|
# 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,
|
color=(0.60, 0.8, 0.6), transient=True,
|
||||||
clients=[clid])
|
clients=[clid])
|
||||||
notification_manager.player_joined(pbid)
|
notification_manager.player_joined(pbid)
|
||||||
if settings["JoinClaim"]:
|
if settings["JoinClaim"]:
|
||||||
jc.join_claim(device_string, clid, pbid)
|
jc.join_claim(device_string, clid, pbid)
|
||||||
# notify players
|
# Notify players
|
||||||
if settings["NotifyPlayer"]:
|
if settings["NotifyPlayer"]:
|
||||||
check_notify_mongo(clid, pbid)
|
check_notify_mongo(clid, pbid)
|
||||||
|
# Ensure the logic is executed from the main thread
|
||||||
|
_ba.pushcall(Call(player_join_logic))
|
||||||
else:
|
else:
|
||||||
# fetch id for first time.
|
# fetch id for first time.
|
||||||
thread = FetchThread(
|
thread = FetchThread(
|
||||||
|
|
@ -347,16 +351,20 @@ def on_player_join_server(pbid, player_data, ip, device_id):
|
||||||
)
|
)
|
||||||
|
|
||||||
thread.start()
|
thread.start()
|
||||||
|
def player_join_logic():
|
||||||
if settings["ServerForWhitelistplayers"]["enable"]:
|
if settings["ServerForWhitelistplayers"]["enable"]:
|
||||||
check_whitelist_player(clid, pbid)
|
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),
|
_ba.screenmessage(settings["firstTimeJoinMsg"], color=(0.6, 0.8, 0.6),
|
||||||
transient=True, clients=[clid])
|
transient=True, clients=[clid])
|
||||||
notification_manager.player_joined(pbid)
|
notification_manager.player_joined(pbid)
|
||||||
if settings["JoinClaim"]:
|
if settings["JoinClaim"]:
|
||||||
jc.join_claim(device_string, clid, pbid)
|
jc.join_claim(device_string, clid, pbid)
|
||||||
# notify players
|
# Notify players
|
||||||
if settings["NotifyPlayer"]:
|
if settings["NotifyPlayer"]:
|
||||||
check_notify_mongo(clid, pbid)
|
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)
|
# pdata.add_profile(pbid,d_string,d_string)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue