From 23d93b2f196ac35b2aaba656bc4bc53e10d01193 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 22 May 2022 00:36:45 -0400 Subject: [PATCH 1/2] Fix Snappy post pinning condition. Recently, caa81452f4dc relaxed the condition for Snappy pinning a post from `body.startswith(':#marseypin:')` to the same sans trailing colon. I believe this was intended to allow :marseypin2: to also lead to post pinning. However, the amusing, though incorrect, side effect is that :marseypinkcat: and :marseypinochet: can now also lead to Snappy pins. This has been remedied by explicitly defining the two conditions we want rather than hoping all :marseypin [sic] are about pinning. --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index c8fd8d0a0..c10ebd68d 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1367,7 +1367,7 @@ def submit_post(v, sub=None): if body.startswith('!slots'): check_for_slots_command(body, snappy, c) - if body.startswith(':#marseypin'): + if body.startswith(':#marseypin:') or body.startswith(':#marseypin2:'): post.stickied = "Snappy" post.stickied_utc = int(time.time()) + 3600 From 8807ed0d13528ed2dabc0dfe0044f2c219d4893a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 22 May 2022 10:58:42 +0200 Subject: [PATCH 2/2] fds --- files/routes/chat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/routes/chat.py b/files/routes/chat.py index c74fbc904..7b6bc9eb6 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -62,6 +62,11 @@ def speak(data, v): if v.shadowbanned: emit('speak', data) + elif blackjack and any(i in text.lower() for i in blackjack.split()): + emit('speak', data) + v.shadowbanned = 'AutoJanny' + g.db.add(v) + g.db.commit() else: emit('speak', data, broadcast=True) messages.append(data)