purge masterlawlz from code

pull/222/head
Aevann 2024-02-10 17:38:10 +02:00
parent 9648feba23
commit 9b2f38d64f
6 changed files with 0 additions and 46 deletions

View File

@ -86,9 +86,6 @@ def execute_snappy(post, v):
body = ":#carpwavelove:"
elif v.id == AEVANN_ID:
body = "https://i.rdrama.net/images/16909380805064178.webp"
elif v.id == LAWLZ_ID:
if random.random() < 0.5: body = "wow, this lawlzpost sucks!"
else: body = "wow, a good lawlzpost for once!"
elif SITE == 'rdrama.net' and v.id == 253:
body = "https://i.rdrama.net/images/16961715452780113.webp"
elif SITE == 'rdrama.net' and v.id == 8094:
@ -573,38 +570,6 @@ def execute_under_siege(v, target, body, kind):
n = Notification(comment_id=target.id, user_id=uid)
g.db.add(n)
def execute_lawlz_actions(v, p):
if v.id != LAWLZ_ID: return
if SITE_NAME != 'rDrama': return
if not FEATURES['PINS']: return
p.stickied_utc = int(time.time()) + 86400
p.stickied = "AutoJanny"
p.distinguish_level = 6
p.flair = filter_emojis_only(":ben10: Required Reading")
ma_1 = ModAction(
kind="pin_post",
user_id=AUTOJANNY_ID,
target_post_id=p.id,
_note='for 1 day'
)
ma_2 = ModAction(
kind="distinguish_post",
user_id=AUTOJANNY_ID,
target_post_id=p.id
)
ma_3 = ModAction(
kind="flair_post",
user_id=AUTOJANNY_ID,
target_post_id=p.id,
_note=f'"{p.flair}"'
)
g.db.add(p)
g.db.add(ma_1)
g.db.add(ma_2)
g.db.add(ma_3)
def process_options(v, target):
patterns = [(poll_regex, 0), (choice_regex, 1)]

View File

@ -565,7 +565,6 @@ PIZZASHILL_ID = 0
CARP_ID = 0
AEVANN_ID = 0
GTIX_ID = 0
LAWLZ_ID = 0
CURRENCY_TRANSFER_ID = 5
@ -682,7 +681,6 @@ if SITE in {'rdrama.net', 'staging.rdrama.net'}:
PROGSTACK_ID = 15531
CARP_ID = 995
AEVANN_ID = 1
LAWLZ_ID = 3833
CURRENCY_TRANSFER_ID = CARP_ID

View File

@ -1531,9 +1531,6 @@ def unsticky_post(post_id, v):
if FEATURES['AWARDS'] and post.stickied.endswith(PIN_AWARD_TEXT) and v.admin_level < PERMS["UNDO_AWARD_PINS"]:
abort(403, "Can't unpin award pins!")
if post.author_id == LAWLZ_ID and post.stickied_utc and SITE_NAME == 'rDrama':
abort(403, "Can't unpin lawlzposts!")
post.stickied = None
post.stickied_utc = None
g.db.add(post)

View File

@ -330,8 +330,6 @@ def award_thing(v, thing_type, id):
elif kind == "unpin":
if not obj.stickied_utc: abort(400)
if not obj.author.deflector or v == obj.author:
if obj.author_id == LAWLZ_ID and SITE_NAME == 'rDrama': abort(403, "You can't unpin lawlzposts!")
if isinstance(obj, Comment):
t = obj.stickied_utc - 3600*6
else:

View File

@ -187,8 +187,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
if v: pins = pins.filter(Post.author_id.notin_(v.userblocks))
if SITE_NAME == 'rDrama':
pins = pins.order_by(Post.author_id != LAWLZ_ID)
pins = pins.order_by(Post.created_utc.desc()).all()
posts = pins + posts

View File

@ -687,8 +687,6 @@ def submit_post(v, hole=None):
v.post_count += 1
g.db.add(v)
execute_lawlz_actions(v, p)
if (SITE == 'rdrama.net'
and v.id in {2008, 3336}
and not (p.hole and p.hole_obj.stealth)) and p.hole != 'slavshit' and not p.ghost: