From f4aa70cc74a095434c21f64c9d72783c08819a41 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 13 Jun 2022 20:10:53 +0200 Subject: [PATCH] Revert "Add user title coin cost parameter." This reverts commit dece3fd460b205f4dcc613076500d0b85c36313b. --- files/helpers/const.py | 2 -- files/helpers/jinja2.py | 5 +---- files/routes/settings.py | 4 ---- files/templates/settings_profile.html | 6 ++---- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 6d0fdffe4..af8c0690c 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -131,13 +131,11 @@ AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically remo PIN_LIMIT = 3 POST_RATE_LIMIT = "1/second;2/minute;10/hour;50/day" -USER_TITLE_COST = 0 HOLE_INACTIVITY_DELETION = False if SITE in {'rdrama.net','devrama.xyz'}: HOLE_COST = 50000 HOLE_INACTIVITY_DELETION = True - USER_TITLE_COST = 25 NOTIFICATIONS_ID = 1046 AUTOJANNY_ID = 2360 SNAPPY_ID = 261 diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index 57c53cff7..49701af9f 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -55,7 +55,4 @@ def inject_constants(): "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "PIZZASHILL_ID":PIZZASHILL_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS, "ADMIGGERS":ADMIGGERS, "datetime":datetime, "time":time, - "LOTTERY_ENABLED": LOTTERY_ENABLED, - # Below this line really should be refactored as params to render_template - "USER_TITLE_COST": USER_TITLE_COST, - } \ No newline at end of file + "LOTTERY_ENABLED": LOTTERY_ENABLED} \ No newline at end of file diff --git a/files/routes/settings.py b/files/routes/settings.py index 1bcea826a..4fe29e5d4 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -921,10 +921,6 @@ def settings_title_change(v): v.customtitle = filter_emojis_only(new_name) - if USER_TITLE_COST and v.coins < USER_TITLE_COST: - return render_template("settings_profile.html", v=v, error=f"Changing flair costs {USER_TITLE_COST} DC.") - v.coins -= USER_TITLE_COST - if len(v.customtitle) < 1000: g.db.add(v) g.db.commit() diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index b4ec699be..563dac3a0 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -470,13 +470,11 @@
- +
    - Limit of 100 characters - {%- if USER_TITLE_COST %} — Costs {{USER_TITLE_COST}} DC to change.{% endif -%} - + Limit of 100 characters