Compare commits
12 Commits
44eaad5e43
...
a1b80e3743
Author | SHA1 | Date |
---|---|---|
Aevann | a1b80e3743 | |
Aevann | a5f62a380a | |
Aevann | cfcc13505f | |
Aevann | 99e35faa68 | |
SneedBot | b65c2646e1 | |
Aevann | 20f47b92a2 | |
Aevann | c425a2af65 | |
Aevann | b3526d35a5 | |
SneedBot | 7c0771c68f | |
SneedBot | a03afc0546 | |
SneedBot | 410da135d3 | |
SneedBot | a5775b3451 |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 158 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 718 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 96 KiB |
|
@ -272,6 +272,7 @@ class Post(Base):
|
|||
if self.distinguished and SITE_NAME == 'WPD':
|
||||
return 0
|
||||
|
||||
#DELETE_ME_PLS
|
||||
if not v and kind == "ricardo":
|
||||
return 0
|
||||
|
||||
|
|
|
@ -302,22 +302,6 @@ def alert_everyone(cid):
|
|||
on conflict do nothing;""")
|
||||
g.db.execute(_everyone_query)
|
||||
|
||||
def alert_admins(body):
|
||||
body_html = sanitize(body, blackjack="admin alert")
|
||||
|
||||
new_comment = Comment(author_id=AUTOJANNY_ID,
|
||||
parent_post=None,
|
||||
level=1,
|
||||
body_html=body_html,
|
||||
sentto=MODMAIL_ID,
|
||||
distinguished=True,
|
||||
is_bot=True
|
||||
)
|
||||
g.db.add(new_comment)
|
||||
g.db.flush()
|
||||
|
||||
new_comment.top_comment_id = new_comment.id
|
||||
|
||||
def alert_active_users(body, vid, extra_criteria):
|
||||
body_html = sanitize(body, blackjack="notification")
|
||||
cid = create_comment(body_html)
|
||||
|
|
|
@ -4,10 +4,12 @@ from files.classes.comment import Comment
|
|||
from files.classes.hole import Hole
|
||||
from flask import request
|
||||
|
||||
#DELETE_ME_PLS
|
||||
words_to_hide = ('israel', 'isreal', 'palestin', 'muslim', 'islam', 'hamas', 'jew', 'zion', 'gaza', 'rafah', 'isis', 'terror', 'iraq', 'allah', 'mohammad', 'muhammad', 'mohammed', 'muhammed', 'mohamad', 'muhamad', 'mohamed', 'muhamed')
|
||||
|
||||
def can_see(user, other):
|
||||
if isinstance(other, (Post, Comment)):
|
||||
#DELETE_ME_PLS
|
||||
if not user:
|
||||
if other.nsfw:
|
||||
return False
|
||||
|
|
|
@ -201,7 +201,6 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'UPDATE_ASSETS': 3,
|
||||
'CHANGE_UNDER_SIEGE': 3,
|
||||
'VIEW_IPS': 3,
|
||||
'MARK_EFFORTPOST': 3,
|
||||
|
||||
'PROGSTACK': 4,
|
||||
'UNDO_AWARD_PINS': 4,
|
||||
|
@ -220,6 +219,7 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'IGNORE_AWARD_IMMUNITY': 4,
|
||||
'INSERT_TRANSACTION': 4,
|
||||
'APPS_MODERATION': 4,
|
||||
'MARK_EFFORTPOST': 4,
|
||||
|
||||
'MODS_EVERY_HOLE': 5,
|
||||
'MODS_EVERY_GROUP': 5,
|
||||
|
@ -263,9 +263,9 @@ if SITE_NAME == 'rDrama':
|
|||
patron = "Paypig"
|
||||
|
||||
TAGLINES = (
|
||||
"largest cat pics site",
|
||||
"largest online LGBTQ+ club",
|
||||
"largest online furfest",
|
||||
"largest cat pics site",
|
||||
"largest basket-weaving forum",
|
||||
"largest autism support group",
|
||||
"largest aztec heritage forum",
|
||||
|
@ -772,6 +772,7 @@ elif SITE == 'watchpeopledie.tv':
|
|||
|
||||
PERMS['POST_COMMENT_EDITING'] = 3
|
||||
PERMS['MODS_EVERY_HOLE'] = 3
|
||||
PERMS['MARK_EFFORTPOST'] = 3
|
||||
PERMS['IS_PERMA_PROGSTACKED'] = 4
|
||||
|
||||
HOLE_BANNER_LIMIT = 69420
|
||||
|
|
|
@ -2143,7 +2143,8 @@ def mark_effortpost(pid, v):
|
|||
|
||||
p.author.pay_account('coins', coins)
|
||||
|
||||
send_repeatable_notification(p.author_id, f":marseyclapping: @{v.username} (a site admin) has marked [{p.title}](/post/{p.id}) as an effortpost, it now gets x{mul} coins from votes. You have received {coins} coins retroactively, thanks! :!marseyclapping:")
|
||||
if v.id != p.author_id:
|
||||
send_repeatable_notification(p.author_id, f":marseyclapping: @{v.username} (a site admin) has marked [{p.title}](/post/{p.id}) as an effortpost, it now gets x{mul} coins from votes. You have received {coins} coins retroactively, thanks! :!marseyclapping:")
|
||||
|
||||
return {"message": "Post has been marked as an effortpost!"}
|
||||
|
||||
|
@ -2179,6 +2180,7 @@ def unmark_effortpost(pid, v):
|
|||
|
||||
p.author.charge_account('coins', coins)
|
||||
|
||||
send_repeatable_notification(p.author_id, f":marseyitsover: @{v.username} (a site admin) has unmarked [{p.title}](/post/{p.id}) as an effortpost. {coins} coins have been deducted from you. :!marseyitsover:")
|
||||
if v.id != p.author_id:
|
||||
send_repeatable_notification(p.author_id, f":marseyitsover: @{v.username} (a site admin) has unmarked [{p.title}](/post/{p.id}) as an effortpost. {coins} coins have been deducted from you. :!marseyitsover:")
|
||||
|
||||
return {"message": "Post has been unmarked as an effortpost!"}
|
||||
|
|
|
@ -140,7 +140,7 @@ def poster_of_the_day_id():
|
|||
user = db.query(User, func.sum(Post.upvotes)).join(Post, Post.author_id == User.id).filter(
|
||||
Post.created_utc > t,
|
||||
User.admin_level == 0,
|
||||
).group_by(User).order_by(func.sum(Post.upvotes).desc()).one_or_none()
|
||||
).group_by(User).order_by(func.sum(Post.upvotes).desc()).first()
|
||||
|
||||
if not user: return SNAPPY_ID
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ def request_api_keys(v):
|
|||
g.db.add(new_app)
|
||||
|
||||
body = f"@{v.username} has requested API keys for `{request.values.get('name')}`. You can approve or deny the request [here](/admin/apps)."
|
||||
alert_admins(body)
|
||||
send_repeatable_notification(AEVANN_ID, body)
|
||||
|
||||
return {"message": "API keys requested successfully!"}
|
||||
|
||||
|
|
|
@ -723,7 +723,7 @@ def submit_post(v, hole=None):
|
|||
|
||||
if flag_effortpost and not (SITE_NAME == 'WPD' and v.truescore < 500):
|
||||
body = f"@{v.username} has requested that [{p.title}](/post/{p.id}) be marked as an effortpost!"
|
||||
alert_admins(body)
|
||||
send_repeatable_notification(AEVANN_ID, body)
|
||||
|
||||
if v.client: return p.json
|
||||
else:
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
{% elif request.path == '/' %}
|
||||
{% if IS_DKD() %}
|
||||
<title>Kongrama</title>
|
||||
{% else %}
|
||||
{# DELETE_ME_PLS #}
|
||||
{% elif v %}
|
||||
<title>{{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random()}}{% endif %}</title>
|
||||
{% else %}
|
||||
<title>{{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES[0]}}{% endif %}</title>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{super()}}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
</h5>
|
||||
</a>
|
||||
|
||||
{# DELETE_ME_PLS #}
|
||||
{% if not v %}
|
||||
{% set image = SITE_FULL_IMAGES + "/assets/images/rDrama/sidebar/63.webp?x=7" %}
|
||||
{% elif hole and hole.sidebarurls %}
|
||||
|
|
|
@ -3073,3 +3073,4 @@ ALTER TABLE ONLY public.comments
|
|||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
|
|