fix prev commit

master
Aevann 2024-10-22 15:10:17 +03:00
parent 4d6c5df4eb
commit 6854ed1d09
2 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,7 @@ VAPID_PUBLIC_KEY = environ.get("VAPID_PUBLIC_KEY").strip()
VAPID_PRIVATE_KEY = environ.get("VAPID_PRIVATE_KEY").strip()
CF_KEY = environ.get("CF_KEY").strip()
CF_ZONE = environ.get("CF_ZONE").strip()
II_KEY = environ.get("II_KEY", "").strip()
blackjack = environ.get("BLACKJACK", "").strip()
PROGSTACK_MUL = float(environ.get("PROGSTACK_MUL", 2.0))
ENCOURAGED = environ.get("ENCOURAGED", "").strip().split()

View File

@ -239,6 +239,13 @@ def sign_up_post(v):
email=email,
), 400
if II_KEY:
data = requests.get(f'https://ipinfo.io/{get_IP()}?token={II_KEY}', headers=HEADERS, timeout=5).json()
print(data['region'], flush=True)
if data['region'] == 'Tennessee':
return signup_error("There was a problem. Please try again!")
if username.title() in GIRL_NAMES_TOTAL:
return signup_error("This name is reserved for a site award.")