From 9b2f38d64f543a8e02defaf20d17d8f4e976b39e Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 10 Feb 2024 17:38:10 +0200 Subject: [PATCH] purge masterlawlz from code --- files/helpers/actions.py | 35 ----------------------------------- files/helpers/config/const.py | 2 -- files/routes/admin.py | 3 --- files/routes/awards.py | 2 -- files/routes/front.py | 2 -- files/routes/posts.py | 2 -- 6 files changed, 46 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 84daa0ff3..11aea811b 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -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)] diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 0f61449ca..2e6fd7e09 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -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 diff --git a/files/routes/admin.py b/files/routes/admin.py index 454fab745..39812c004 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -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) diff --git a/files/routes/awards.py b/files/routes/awards.py index c8cd15ae7..88a7ccea3 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -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: diff --git a/files/routes/front.py b/files/routes/front.py index b211ca522..8c0735d01 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -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 diff --git a/files/routes/posts.py b/files/routes/posts.py index 154fab171..f270dcd3c 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -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: