mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-07 17:36:15 +00:00
Error fixed.
Fixed the Import error that was causing during the logs in chathandle.
This commit is contained in:
parent
afefc2a8dd
commit
4b70b549b4
2 changed files with 8 additions and 8 deletions
2
dist/ba_root/mods/chatHandle/handlechat.py
vendored
2
dist/ba_root/mods/chatHandle/handlechat.py
vendored
|
|
@ -38,7 +38,7 @@ def filter_chat_message(msg, client_id):
|
||||||
if msg.startswith(",") and settings["allowTeamChat"]:
|
if msg.startswith(",") and settings["allowTeamChat"]:
|
||||||
return Main.QuickAccess(msg,client_id)
|
return Main.QuickAccess(msg,client_id)
|
||||||
|
|
||||||
Logger.log(acid+" | "+displaystring+"|"+currentname+"| " +msg,"chat")
|
logger.log(acid+" | "+displaystring+"|"+currentname+"| " +msg,"chat")
|
||||||
|
|
||||||
if acid in serverdata.clients and serverdata.clients[acid]["verified"]:
|
if acid in serverdata.clients and serverdata.clients[acid]["verified"]:
|
||||||
|
|
||||||
|
|
|
||||||
14
dist/ba_root/mods/tools/servercheck.py
vendored
14
dist/ba_root/mods/tools/servercheck.py
vendored
|
|
@ -77,13 +77,13 @@ class checkserver(object):
|
||||||
d_str=ros['display_string']
|
d_str=ros['display_string']
|
||||||
d_str2=profanity.censor(d_str)
|
d_str2=profanity.censor(d_str)
|
||||||
try:
|
try:
|
||||||
Logger.log(d_str+"||"+ros["account_id"]+"|| joined server","playerjoin")
|
logger.log(d_str+"||"+ros["account_id"]+"|| joined server","playerjoin")
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if d_str2!=d_str:
|
if d_str2!=d_str:
|
||||||
_ba.screenmessage("Profanity in Id , change your ID and join back",color=(1,0,0),transient=True,clients=[ros['client_id']])
|
_ba.screenmessage("Profanity in Id , change your ID and join back",color=(1,0,0),transient=True,clients=[ros['client_id']])
|
||||||
try:
|
try:
|
||||||
Logger.log(d_str+"||"+ros["account_id"]+"|| kicked by profanity check","sys")
|
logger.log(d_str+"||"+ros["account_id"]+"|| kicked by profanity check","sys")
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
_ba.disconnect_client(ros['client_id'],1)
|
_ba.disconnect_client(ros['client_id'],1)
|
||||||
|
|
@ -92,7 +92,7 @@ class checkserver(object):
|
||||||
if settings["whitelist"] and ros["account_id"]!=None:
|
if settings["whitelist"] and ros["account_id"]!=None:
|
||||||
if ros["account_id"] not in pdata.whitelist:
|
if ros["account_id"] not in pdata.whitelist:
|
||||||
_ba.screenmessage("Not in whitelist,contact admin",color=(1,0,0),transient=True,clients=[ros['client_id']])
|
_ba.screenmessage("Not in whitelist,contact admin",color=(1,0,0),transient=True,clients=[ros['client_id']])
|
||||||
Logger.log(d_str+"||"+ros["account_id"]+" | kicked > not in whitelist")
|
logger.log(d_str+"||"+ros["account_id"]+" | kicked > not in whitelist")
|
||||||
_ba.disconnect_client(ros['client_id'])
|
_ba.disconnect_client(ros['client_id'])
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -124,7 +124,7 @@ def on_player_join_server(pbid,player_data):
|
||||||
rejoinCount+=1
|
rejoinCount+=1
|
||||||
if rejoinCount >2:
|
if rejoinCount >2:
|
||||||
_ba.screenmessage("Joining too fast , slow down dude",color=(1,0,1),transient=True,clients=[clid])
|
_ba.screenmessage("Joining too fast , slow down dude",color=(1,0,1),transient=True,clients=[clid])
|
||||||
Logger.log(pbid+"|| kicked for joining too fast")
|
logger.log(pbid+"|| kicked for joining too fast")
|
||||||
_ba.disconnect_client(clid)
|
_ba.disconnect_client(clid)
|
||||||
|
|
||||||
_thread.start_new_thread(reportSpam,(pbid,))
|
_thread.start_new_thread(reportSpam,(pbid,))
|
||||||
|
|
@ -149,7 +149,7 @@ def on_player_join_server(pbid,player_data):
|
||||||
if ros['account_id']==pbid:
|
if ros['account_id']==pbid:
|
||||||
if not player_data["isBan"]:
|
if not player_data["isBan"]:
|
||||||
_ba.screenmessage("New Accounts not allowed here , come back later",color=(1,0,0), transient=True,clients=[ros['client_id']])
|
_ba.screenmessage("New Accounts not allowed here , come back later",color=(1,0,0), transient=True,clients=[ros['client_id']])
|
||||||
Logger.log(pbid+" | kicked > reason:Banned account")
|
logger.log(pbid+" | kicked > reason:Banned account")
|
||||||
_ba.disconnect_client(ros['client_id'])
|
_ba.disconnect_client(ros['client_id'])
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
@ -315,7 +315,7 @@ def save_age(age, pb_id,display_string):
|
||||||
thread2.start()
|
thread2.start()
|
||||||
if get_account_age(age) < settings["minAgeToJoinInHours"]:
|
if get_account_age(age) < settings["minAgeToJoinInHours"]:
|
||||||
msg="New Accounts not allowed to play here , come back tmrw."
|
msg="New Accounts not allowed to play here , come back tmrw."
|
||||||
Logger.log(pb_id+"|| kicked > new account")
|
logger.log(pb_id+"|| kicked > new account")
|
||||||
_ba.pushcall(Call(kick_by_pb_id,pb_id,msg),from_other_thread=True)
|
_ba.pushcall(Call(kick_by_pb_id,pb_id,msg),from_other_thread=True)
|
||||||
|
|
||||||
def save_ids(ids,pb_id,display_string):
|
def save_ids(ids,pb_id,display_string):
|
||||||
|
|
@ -328,7 +328,7 @@ def save_ids(ids,pb_id,display_string):
|
||||||
msg="Spoofed Id detected , Goodbye"
|
msg="Spoofed Id detected , Goodbye"
|
||||||
_ba.pushcall(Call(kick_by_pb_id,pb_id,msg),from_other_thread=True)
|
_ba.pushcall(Call(kick_by_pb_id,pb_id,msg),from_other_thread=True)
|
||||||
serverdata.clients[pb_id]["verified"]=False
|
serverdata.clients[pb_id]["verified"]=False
|
||||||
Logger.log(pb_id+"|| kicked , for using spoofed id "+display_string)
|
logger.log(pb_id+"|| kicked , for using spoofed id "+display_string)
|
||||||
else:
|
else:
|
||||||
serverdata.clients[pb_id]["verified"]=True
|
serverdata.clients[pb_id]["verified"]=True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue