diff --git a/files/assets/emojis.json b/files/assets/emojis.json index 8d1e8de3e..c08a95f63 100644 --- a/files/assets/emojis.json +++ b/files/assets/emojis.json @@ -839,6 +839,7 @@ {"name":"gigachad","tags": ["chad"],"class":"Misc"}, {"name":"gigachad2", "tags": ["chad"], "class":"Misc"}, {"name":"gigachad3", "tags": ["chad"], "class":"Misc"}, + {"name":"pedobear", "class":"Misc"}, {"name":"kippy","class":"Misc"}, {"name":"onerat","class":"Misc"}, {"name":"gunt","class":"Misc"} diff --git a/files/assets/emojis.lgbdropthet.json b/files/assets/emojis.lgbdropthet.json index c0924615d..6ae21957a 100644 --- a/files/assets/emojis.lgbdropthet.json +++ b/files/assets/emojis.lgbdropthet.json @@ -378,5 +378,6 @@ {"name":"wholesomeseal","class":"Misc"}, {"name":"gigachadglow","tags": ["chad", "glow", "fbi"],"class":"Misc"}, {"name":"gigachad","tags": ["chad"],"class":"Misc"}, - {"name":"gigachad2", "tags": ["chad"], "class":"Misc"} + {"name":"gigachad2", "tags": ["chad"], "class":"Misc"}, + {"name":"pedobear", "class":"Misc"} ] diff --git a/files/assets/images/emojis/pedobear.webp b/files/assets/images/emojis/pedobear.webp new file mode 100644 index 000000000..dd797e574 Binary files /dev/null and b/files/assets/images/emojis/pedobear.webp differ diff --git a/files/assets/js/comments+submission_listing.js b/files/assets/js/comments+submission_listing.js index 49056b0f1..c081efc81 100644 --- a/files/assets/js/comments+submission_listing.js +++ b/files/assets/js/comments+submission_listing.js @@ -36,13 +36,15 @@ function popclick(e) { let popover = document.getElementsByClassName("popover") popover = popover[popover.length-1] - const badgesDOM = popover.getElementsByClassName('pop-badges')[0]; - badgesDOM.innerHTML = ""; - for (const badge of author["badges"]) { - const badgeDOM = popClickBadgeTemplateDOM.cloneNode(); - badgeDOM.src = badge + "?v=1021"; + if (popover.getElementsByClassName('pop-badges').length > 0) { + const badgesDOM = popover.getElementsByClassName('pop-badges')[0]; + badgesDOM.innerHTML = ""; + for (const badge of author["badges"]) { + const badgeDOM = popClickBadgeTemplateDOM.cloneNode(); + badgeDOM.src = badge + "?v=1021"; - badgesDOM.append(badgeDOM); + badgesDOM.append(badgeDOM); + } } popover.getElementsByClassName('pop-banner')[0].src = author["bannerurl"] diff --git a/files/classes/user.py b/files/classes/user.py index 738255561..74a75fe28 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -187,7 +187,7 @@ class User(Base): @lazy def mod_date(self, sub): - if self.id == AEVANN_ID: return 1 + if self.admin_level >= 3: return 1 mod = g.db.query(Mod).filter_by(user_id=self.id, sub=sub).one_or_none() if not mod: return None return mod.created_utc diff --git a/files/helpers/actions.py b/files/helpers/actions.py index d150167a2..418a19a6c 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -152,7 +152,7 @@ def execute_snappy(post, v): if body.startswith('!slots'): check_for_slots_command(body, snappy, c) - if PIN_ENABLED and (body.startswith(':#marseypin:') or body.startswith(':#marseypin2:')): + if FEATURES['PINS'] and (body.startswith(':#marseypin:') or body.startswith(':#marseypin2:')): post.stickied = "Snappy" post.stickied_utc = int(time.time()) + 3600 diff --git a/files/helpers/blackjack.py b/files/helpers/blackjack.py index c0c753059..48dda1dd9 100644 --- a/files/helpers/blackjack.py +++ b/files/helpers/blackjack.py @@ -1,6 +1,7 @@ from json.encoder import INFINITY import random from math import floor +from files.helpers.const import * deck_count = 4 ranks = ("2", "3", "4", "5", "6", "7", "8", "9", "X", "J", "Q", "K", "A") @@ -51,7 +52,7 @@ def format_all(player_hand, dealer_hand, deck, status, wager, kind, is_insured=0 def check_for_blackjack_commands(in_text, from_user, from_comment): - if not from_user.can_gamble: + if not FEATURES['GAMBLING'] or not from_user.can_gamble: return for command_word in (coins_command_word, marseybux_command_word): diff --git a/files/helpers/const.py b/files/helpers/const.py index db685dba3..1ca362444 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -133,17 +133,31 @@ AGENDAPOSTER_MSG_HTML = """
Hi week).count(),
}
- if site == 'rDrama':
+ if site == 'rDrama' or FEATURES['HOUSES']:
stats2 = {
"House furry members": g.db.query(User).filter(User.house.like('Furry%')).count(),
"House femboy members": g.db.query(User).filter(User.house.like('Femboy%')).count(),
diff --git a/files/helpers/treasure.py b/files/helpers/treasure.py
index 2c23e76a3..ad29855f7 100644
--- a/files/helpers/treasure.py
+++ b/files/helpers/treasure.py
@@ -12,7 +12,7 @@ lotterizer_rate = 33
def check_for_treasure(in_text, from_comment):
user = from_comment.author
- if not user.can_gamble:
+ if not FEATURES['GAMBLING'] or not user.can_gamble:
return
if '!slots' not in in_text and '!blackjack' not in in_text and '!wordle' not in in_text:
diff --git a/files/routes/admin.py b/files/routes/admin.py
index d2c468812..66508b789 100644
--- a/files/routes/admin.py
+++ b/files/routes/admin.py
@@ -507,6 +507,9 @@ def under_attack(v):
@app.get("/admin/badge_grant")
@admin_level_required(2)
def badge_grant_get(v):
+ if not FEATURES['BADGES']:
+ abort(404)
+
badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all()
return render_template("admin/badge_grant.html", v=v, badge_types=badges)
@@ -515,6 +518,9 @@ def badge_grant_get(v):
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@admin_level_required(2)
def badge_grant_post(v):
+ if not FEATURES['BADGES']:
+ abort(404)
+
badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all()
user = get_user(request.values.get("username").strip(), graceful=True)
@@ -562,6 +568,9 @@ def badge_grant_post(v):
@app.get("/admin/badge_remove")
@admin_level_required(2)
def badge_remove_get(v):
+ if not FEATURES['BADGES']:
+ abort(404)
+
badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all()
return render_template("admin/badge_remove.html", v=v, badge_types=badges)
@@ -571,6 +580,9 @@ def badge_remove_get(v):
@limiter.limit("1/second;30/minute;200/hour;1000/day")
@admin_level_required(2)
def badge_remove_post(v):
+ if not FEATURES['BADGES']:
+ abort(404)
+
badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all()
user = get_user(request.values.get("username").strip(), graceful=True)
@@ -1196,7 +1208,7 @@ def api_distinguish_post(post_id, v):
@app.post("/sticky/ This page is only available to {% if SITE_NAME == 'rDrama' %}paypigs{% else %}patrons{% endif %}:Content
+
@@ -35,12 +40,18 @@
Grant
-
+{%- endif %}
API Access Control
diff --git a/files/templates/comments.html b/files/templates/comments.html
index 3103a9713..1cc43559c 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -8,7 +8,7 @@
{% endif %}
- {% if v %}
+ {% if v and FEATURES['AWARDS'] %}
{% include "award_modal.html" %}
{% endif %}
@@ -25,8 +25,10 @@
+ {% if FEATURES['BADGES'] -%}
- {% if not c.ghost or v.id == AEVANN_ID %}
401 Not Authorized
-
- {% if SITE_NAME != 'WPD' %}
+ {% if FEATURES['GAMBLING'] %}
!slots100
- Play slots using coins - minimum 100 coins
-
-
- {% endif %}
- !slotsmb100
- Play slots using marseybux - minimum 100 marseybux
+ !slots100
+ Play slots using coins - minimum 100 coins
-
- {% if SITE_NAME != 'WPD' %}
+ {% if FEATURES['PROCOINS'] %}
+ !blackjack100
- Play blackjack using coins - minimum 100 coins
-
+
+ {% endif %}
!slotsmb100
+ Play slots using marseybux - minimum 100 marseybux
+
-
+ {% if FEATURES['PROCOINS'] %}
+ !blackjackmb100
- Play blackjack using marseybux - minimum 100 marseybux
+ !blackjack100
+ Play blackjack using coins - minimum 100 coins
+
+ {% endif %}
{% endif %}
!blackjackmb100
+ Play blackjack using marseybux - minimum 100 marseybux
+
!wordle
diff --git a/files/templates/header.html b/files/templates/header.html
index d829e4dc6..1f5d2461b 100644
--- a/files/templates/header.html
+++ b/files/templates/header.html
@@ -130,11 +130,9 @@
{% if v and v.can_gamble and LOTTERY_ENABLED %}
-
-
+
-
{% endif %}
{% if v %}
+ {% if FEATURES['CHAT'] -%}
+ {%- endif %}
+ {% if FEATURES['AWARDS'] -%}
+ {%- endif %}
{% else %}