forked from rDrama/rDrama
1
0
Fork 0

Compare commits

...

12 Commits

Author SHA1 Message Date
Aevann a1b80e3743 remove alert_admins 2024-02-17 16:00:59 +02:00
Aevann a5f62a380a fix 500 error 2024-02-17 15:58:17 +02:00
Aevann cfcc13505f make MARK_EFFORTPOST JL4 on rdrama 2024-02-17 15:51:29 +02:00
Aevann 99e35faa68 dont notify urself 2024-02-17 15:51:29 +02:00
SneedBot b65c2646e1 sneed 2024-02-17 13:02:14 +00:00
Aevann 20f47b92a2 add more DELETE_ME_PLS 2024-02-17 14:33:01 +02:00
Aevann c425a2af65 only show the first tagline to loggedout 2024-02-17 14:31:08 +02:00
Aevann b3526d35a5 add DELETE_ME_PLS 2024-02-17 14:31:08 +02:00
SneedBot 7c0771c68f sneed 2024-02-17 12:02:15 +00:00
SneedBot a03afc0546 sneed 2024-02-17 12:00:14 +00:00
SneedBot 410da135d3 sneed 2024-02-17 11:02:14 +00:00
SneedBot a5775b3451 sneed 2024-02-17 00:00:15 +00:00
21 changed files with 19 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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!"}

View File

@ -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

View File

@ -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!"}

View File

@ -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:

View File

@ -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()}}

View File

@ -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 %}

View File

@ -3073,3 +3073,4 @@ ALTER TABLE ONLY public.comments
--
-- PostgreSQL database dump complete
--