restore temporarily

master
Aevann 2024-05-03 05:09:47 +03:00
parent 784005849d
commit 65b3b1a370
5 changed files with 31 additions and 5 deletions

View File

@ -278,6 +278,10 @@ class Post(Base):
if self.distinguished and SITE_NAME == 'WPD':
return 0
#DELETE_ME_PLS
if not v and kind == "ricardo":
return 0
num = len([x for x in self.awards if x.kind == kind])
if kind in {"shit", "fireflies", "tilt"}:

View File

@ -4,10 +4,17 @@ from files.classes.comment import Comment
from files.classes.hole import Hole
from flask import request
#DELETE_ME_PLS
words_to_hide = ('israel', 'isreal', 'palest', 'muslim', 'islam', 'hamas', 'jew', 'zion', 'gaza', 'rafah', 'isis', 'terror', 'iraq', 'allah', 'mohammad', 'muhammad', 'mohammed', 'muhammed', 'mohamad', 'muhamad', 'mohamed', 'muhamed', 'trans', 'train', 'tranny', 'troon', 'rowdy', 'nigger', 'bipoc')
def can_see(user, obj):
if isinstance(obj, (Post, Comment)):
if not user and SITE == 'watchpeopledie.tv' and isinstance(obj, Post) and obj.hole in {'sandshit','isis'}:
return False
#DELETE_ME_PLS
if not user:
if obj.nsfw:
return False
if any((x in obj.body.lower() for x in words_to_hide)):
return False
if not can_see(user, obj.author): return False
if user and user.id == obj.author_id: return True
@ -39,6 +46,10 @@ def can_see(user, obj):
if obj.name == 'chudrama': return bool(user) and user.can_see_chudrama
if obj.name == 'countryclub': return bool(user) and user.can_see_countryclub
if obj.name == 'highrollerclub': return bool(user) and user.can_see_highrollerclub
#DELETE_ME_PLS
if obj.name in {'sandshit', 'isis', 'facism', 'furry', 'fatpeoplehate', 'toomanyxchromosomes', 'drugs', 'faggot', 'spalspace', 'deadniggerstorage'}: return bool(user)
elif obj.__class__.__name__ == 'User':
#DELETE_ME_PLS
if obj.id == 21238: return False
return not obj.shadowbanned or (user and user.id == obj.id) or (user and user.admin_level >= PERMS['USER_SHADOWBAN'])
return True

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

@ -19,7 +19,11 @@
</h5>
</a>
{% if hole and hole.sidebarurls %}
{# DELETE_ME_PLS #}
{% if not v %}
{% set image = SITE_FULL_IMAGES + "/i/WPD/sidebar/622.webp?x=8" %}
{% set expanded_image = image|expand_art %}
{% elif hole and hole.sidebarurls %}
{% set image = hole.random_sidebar %}
{% elif IS_FISTMAS() or IS_BDAY() %}
{% set image = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/sidebar/" ~ SITE_NAME) %}

View File

@ -15,7 +15,11 @@
</h5>
</a>
{% if hole and hole.sidebarurls %}
{# DELETE_ME_PLS #}
{% if not v %}
{% set image = SITE_FULL_IMAGES + "/i/rDrama/sidebar/2464.webp?x=8" %}
{% set expanded_image = image|expand_art %}
{% elif hole and hole.sidebarurls %}
{% set image = hole.random_sidebar %}
{% elif IS_FISTMAS() or IS_BDAY() %}
{% set image = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/sidebar/" ~ SITE_NAME) %}