remove /h/masterbaiters

pull/139/head
Aevann 2023-03-13 20:53:08 +02:00
parent f8e95564b5
commit 729b095713
6 changed files with 6 additions and 20 deletions

View File

@ -3389,10 +3389,10 @@ a.text-info:hover, a.text-info:focus {
a.text-warning:hover, a.text-warning:focus { a.text-warning:hover, a.text-warning:focus {
color: #ba8b00 !important; color: #ba8b00 !important;
} }
.text-danger, :not(td) > a[href="/h/chudrama"], :not(td) > a[href="/h/countryclub"], :not(td) > a[href="/h/masterbaiters"] { .text-danger, :not(td) > a[href="/h/chudrama"], :not(td) > a[href="/h/countryclub"] {
color: #dc3545 !important; color: #dc3545 !important;
} }
a.text-danger:hover, a.text-danger:focus, :not(td) > a[href="/h/chudrama"]:focus, :not(td) > a[href="/h/countryclub"]:focus, :not(td) > a[href="/h/masterbaiters"]:focus { a.text-danger:hover, a.text-danger:focus, :not(td) > a[href="/h/chudrama"]:focus, :not(td) > a[href="/h/countryclub"]:focus {
color: #a71d2a !important; color: #a71d2a !important;
} }
.text-muted { .text-muted {

View File

@ -114,7 +114,7 @@ class Submission(Base):
link = f"/post/{self.id}" link = f"/post/{self.id}"
if self.sub: link = f"/h/{self.sub}{link}" if self.sub: link = f"/h/{self.sub}{link}"
if self.sub and self.sub in {'chudrama', 'countryclub', 'masterbaiters'}: if self.sub and self.sub in {'chudrama', 'countryclub'}:
output = '-' output = '-'
else: else:
title = self.plaintitle(None).lower() title = self.plaintitle(None).lower()

View File

@ -1041,8 +1041,7 @@ class User(Base):
return user.admin_level >= PERMS['BLACKJACK_NOTIFICATIONS'] return user.admin_level >= PERMS['BLACKJACK_NOTIFICATIONS']
elif isinstance(other, Sub): elif isinstance(other, Sub):
if other.name == 'chudrama': return bool(user) and user.can_see_chudrama if other.name == 'chudrama': return bool(user) and user.can_see_chudrama
if other.name in {'countryclub','splash_mountain'}: return bool(user) and user.can_see_countryclub if other.name == 'countryclub': return bool(user) and user.can_see_countryclub
if other.name == 'masterbaiters': return bool(user) and user.can_see_masterbaiters
elif isinstance(other, User): elif isinstance(other, User):
return (user and user.id == other.id) or (user and user.can_see_shadowbanned) or not other.shadowbanned return (user and user.id == other.id) or (user and user.can_see_shadowbanned) or not other.shadowbanned
return True return True
@ -1071,15 +1070,6 @@ class User(Base):
if self.truescore >= TRUESCORE_CLUB_MINIMUM: return True if self.truescore >= TRUESCORE_CLUB_MINIMUM: return True
return False return False
@property
@lazy
def can_see_masterbaiters(self):
if self.blacklisted_by: return False
if self.shadowbanned: return False
if self.is_suspended_permanently: return False
if self.truescore >= TRUESCORE_MASTERBAITERS_MINIMUM: return True
return False
@property @property
@lazy @lazy
def can_post_in_ghost_threads(self): def can_post_in_ghost_threads(self):

View File

@ -56,8 +56,6 @@ def execute_snappy(post:Submission, v:User):
elif v.id == LAWLZ_ID: elif v.id == LAWLZ_ID:
if random.random() < 0.5: body = "wow, this lawlzpost sucks!" if random.random() < 0.5: body = "wow, this lawlzpost sucks!"
else: body = "wow, a good lawlzpost for once!" else: body = "wow, a good lawlzpost for once!"
elif post.sub == 'masterbaiters' and random.random() < 0.33:
body = "Can you people come up with any ideas that don't involve committing federal crimes"
else: else:
if SNAPPY_MARSEYS and SNAPPY_QUOTES: if SNAPPY_MARSEYS and SNAPPY_QUOTES:
if IS_FISTMAS() or random.random() > 0.5: if IS_FISTMAS() or random.random() > 0.5:

View File

@ -324,7 +324,6 @@ if SITE_NAME == 'rDrama':
'anime', 'anime',
'gaybros', 'gaybros',
'againsthateholes', 'againsthateholes',
'masterbaiters',
'countryclub', 'countryclub',
'changelog', 'changelog',
'programming', 'programming',
@ -627,8 +626,7 @@ COSMETIC_AWARD_COIN_AWARD_PCT = 0.10
TRUESCORE_CHAT_MINIMUM = 0 TRUESCORE_CHAT_MINIMUM = 0
TRUESCORE_GHOST_MINIMUM = 0 TRUESCORE_GHOST_MINIMUM = 0
TRUESCORE_DONATE_MINIMUM = 10 TRUESCORE_DONATE_MINIMUM = 10
TRUESCORE_MASTERBAITERS_MINIMUM = 100 TRUESCORE_CLUB_MINIMUM = 100
TRUESCORE_CLUB_MINIMUM = 1000
TRUESCORE_CHUDRAMA_MINIMUM = 10 TRUESCORE_CHUDRAMA_MINIMUM = 10
LOGGEDIN_ACTIVE_TIME = 15 * 60 LOGGEDIN_ACTIVE_TIME = 15 * 60

View File

@ -61,7 +61,7 @@ def _sub_inactive_purge_task():
.filter(Submission.sub != None, Submission.created_utc > one_week_ago, .filter(Submission.sub != None, Submission.created_utc > one_week_ago,
Submission.private == False, Submission.is_banned == False, Submission.private == False, Submission.is_banned == False,
Submission.deleted_utc == 0).all()] Submission.deleted_utc == 0).all()]
active_holes.extend(['changelog','countryclub','masterbaiters']) # holes immune from deletion active_holes.extend(['changelog','countryclub']) # holes immune from deletion
dead_holes = g.db.query(Sub).filter(Sub.name.notin_(active_holes)).all() dead_holes = g.db.query(Sub).filter(Sub.name.notin_(active_holes)).all()
names = [x.name for x in dead_holes] names = [x.name for x in dead_holes]