added VPN check to disallow people with
This commit is contained in:
parent
444aa24f88
commit
f7a399cb27
@ -222,6 +222,26 @@ async def update_asn(ipv4, steam_id2_, client, discord_id, member, bad_asn, stea
|
|||||||
await channel1.send(f"!!!WARNING!!! \n{steam_account}Discord account ({discord_id}) is associated to an unloze forum account: https://unloze.com/members/.{res_user_id[0]}/\nName {member.name}. Descriminator ID: {member.discriminator}.\n\nUSER WILL NOT AUTOMATICALLY BE ALLOWED INTO THE DISCORD SERVER DUE TO POTENTIALLY BEING A SUSPICIOUS ACCOUNT.\n{asn_status}!!!WARNING!!!")
|
await channel1.send(f"!!!WARNING!!! \n{steam_account}Discord account ({discord_id}) is associated to an unloze forum account: https://unloze.com/members/.{res_user_id[0]}/\nName {member.name}. Descriminator ID: {member.discriminator}.\n\nUSER WILL NOT AUTOMATICALLY BE ALLOWED INTO THE DISCORD SERVER DUE TO POTENTIALLY BEING A SUSPICIOUS ACCOUNT.\n{asn_status}!!!WARNING!!!")
|
||||||
break
|
break
|
||||||
break
|
break
|
||||||
|
if do_allow:
|
||||||
|
sql_statement = """
|
||||||
|
select `type` from vpn_check.ip_table it
|
||||||
|
where it.ip = %s
|
||||||
|
"""
|
||||||
|
cur2.execute(sql_statement, [ipv4])
|
||||||
|
res = cur2.fetchone()
|
||||||
|
if res:
|
||||||
|
vpn_type = res[0]
|
||||||
|
if vpn_type == 1:
|
||||||
|
do_allow = False
|
||||||
|
sql_statement = """
|
||||||
|
update unloze_playtimestats.player_time
|
||||||
|
set discord_allowed = 1 where steam_id = %s
|
||||||
|
"""
|
||||||
|
cur2.execute(sql_statement, [steam_id2_])
|
||||||
|
conn2.commit()
|
||||||
|
for channel1 in client.get_all_channels():
|
||||||
|
if channel1.name == 'logs-discord-allowed':
|
||||||
|
await channel1.send(f"!!!WARNING!!! \n{steam_account}Discord account ({discord_id}) is associated to an unloze forum account: https://unloze.com/members/.{res_user_id[0]}/\nName {member.name}. Descriminator ID: {member.discriminator}.\n\nUSER WILL NOT AUTOMATICALLY BE ALLOWED INTO THE DISCORD SERVER DUE TO USING A VPN: {ipv4}.\n!!!WARNING!!!")
|
||||||
return do_allow
|
return do_allow
|
||||||
|
|
||||||
async def verify_player(res_all_, steam_id2_, steam_account, member, discord_id, client, res_user_id, bad_asn, steam_id2__, cur2, conn2):
|
async def verify_player(res_all_, steam_id2_, steam_account, member, discord_id, client, res_user_id, bad_asn, steam_id2__, cur2, conn2):
|
||||||
|
Loading…
Reference in New Issue
Block a user