diff --git a/files/helpers/const.py b/files/helpers/const.py index 4aebf932e..44aba16b6 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -106,8 +106,8 @@ SLURS = { single_words = "|".join([slur.lower() for slur in SLURS.keys()]) -SLUR_REGEX = re.compile(rf"(?i)((?<=\s|>)|^)({single_words})((?=[\s<,.]|s[\s<,.])|$)", re.A) -SLUR_REGEX_UPPER = re.compile(rf"((?<=\s|>)|^)({single_words.upper()})((?=[\s<,.]|s[\s<,.])|$)", re.A) +SLUR_REGEX = re.compile(rf"((?<=\s|>)|^)({single_words})((?=[\s<,.$]|s[\s<,.$]))", re.I|re.A) +SLUR_REGEX_UPPER = re.compile(rf"((?<=\s|>)|^)({single_words.upper()})((?=[\s<,.$]|S[\s<,.$]))", re.A) def sub_matcher(match): return SLURS[match.group(0).lower()] diff --git a/files/routes/admin.py b/files/routes/admin.py index 81031dfed..d501d6ca8 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -415,7 +415,9 @@ def reported_comments(v): def admin_home(v): with open('disable_signups', 'r') as f: x = f.read() - response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS).json()['result']['value'] + if CF_ZONE == '3435tdfsdudebussylmaoxxt43': response = 'high' + else: response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS).json()['result']['value'] + x2 = response == 'under_attack' return render_template("admin/admin_home.html", v=v, x=x, x2=x2) diff --git a/files/routes/login.py b/files/routes/login.py index 6d7d0775f..5b66caac9 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -25,7 +25,6 @@ def login_get(v): def check_for_alts(current_id): - if SITE == 'localhost': return past_accs = set(session.get("history", [])) past_accs.add(current_id) session["history"] = list(past_accs) @@ -323,7 +322,9 @@ def sign_up_post(v): id_1 = g.db.query(User.id).filter_by(id=9).count() users_count = g.db.query(User.id).count() - if id_1 == 0 and users_count == 8: admin_level=3 + if id_1 == 0 and users_count == 8: + admin_level=3 + session["history"] = [] else: admin_level=0 new_user = User( diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 31ef64df2..280381a81 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/changelog.html b/files/templates/changelog.html index 724219473..c690eb250 100644 --- a/files/templates/changelog.html +++ b/files/templates/changelog.html @@ -104,6 +104,6 @@ {% endif %} - + {% endblock %} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 488cf997e..5287f9f23 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -938,7 +938,7 @@ {% if v %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 35a941ada..a2b05c846 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% if sub and sub.css and not request.path.endswith('settings') %} @@ -330,7 +330,7 @@ {% if v %} - + {% endif %} diff --git a/files/templates/header.html b/files/templates/header.html index 9344df6d5..5d2fc72bb 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -254,7 +254,7 @@ - + - + {% if v.agendaposter %} - + {% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html index a3af24fa5..c8a56c7fc 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index dc99cfc17..9e1208e4c 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{SITE_NAME}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index d4f3da3c3..47e2f8deb 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sidebar_Ruqqus.html b/files/templates/sidebar_Ruqqus.html index 8e06d9ef8..95dab6a15 100644 --- a/files/templates/sidebar_Ruqqus.html +++ b/files/templates/sidebar_Ruqqus.html @@ -16,7 +16,7 @@ SUB SETTINGS {% endif %} {% else %} -

Rules: No doxxing, No CP or other clearly illegal shit. Thanks!

+

Rules: No doxxing, No CP or other clearly illegal shit. Also no nazis, go to communities.win. Thanks!

{% endif %} CREATE SUB diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 64b567a22..d1e2f061f 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index 1ab5cb379..2fcb7aa77 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index e37c8f0ef..860b18765 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %}