Commit Graph

550 Commits (3aa6a838cbca5b71d8799840baa6bedefd9a7d1e)

Author SHA1 Message Date
Snakes e0c3c79902 WPD: Require flairs on all posts. 2022-06-26 03:42:56 -04:00
Snakes 268c23e2f8 WPD: make holes more flair-like in UI. 2022-06-26 03:42:15 -04:00
Snakes cd556b6d8e Refactor UI name of hole/sub to constant. 2022-06-26 03:41:28 -04:00
Aevann1 c1d227e2b6 exclude poll bots from "simps for" lists 2022-06-25 22:24:47 +02:00
Aevann1 f34c4e1196 stop using app.config for our own stuff 2022-06-24 17:08:57 +02:00
Aevann1 9593dc58dd move regex from helpers.const into its own helper file 2022-06-24 16:30:59 +02:00
Snakes ce79b1d84b PCM: lottery duration back to 1wk. 2022-06-23 22:40:51 -04:00
Aevann1 6463cbd1f4 "kike" slur filter modification 2022-06-24 00:33:39 +02:00
Aevann1 cff28b2070 add i.reddit.com to reddit_domain_regex 2022-06-23 22:00:49 +02:00
Aevann1 2c1d1aceff fix this https://chapotraphouse.club/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2178607?context=8#context 2022-06-23 21:43:49 +02:00
Aevann1 810e80c010 fix issue with snappy url archival 2022-06-23 21:41:23 +02:00
Aevann1 39cf7fc48b refactor normalizing urls at runtime (I put the function in comment.py cuz there were weird import errors that i didnt wanna fix) 2022-06-23 17:47:57 +02:00
gooseman 6fec7d51d9 make me notified (#308) 2022-06-22 21:37:27 -04:00
Aevann1 0e1177843e remove the need for alert flag on sanitize() 2022-06-23 00:12:47 +02:00
Aevann1 ebdda8c412 add poll_thread (fix) 2022-06-22 20:01:22 +02:00
Aevann1 414eb12410 add poll_thread 2022-06-22 20:01:00 +02:00
Snakes e2cd25db67 WPD: limit hole creation to JL2+. 2022-06-21 01:20:21 -04:00
Snakes f6b6997f61 Persist activity timestamp to users. 2022-06-20 16:25:03 -04:00
Aevann1 ef3fbbf520 adjusting greentext regex 2022-06-19 22:22:36 +02:00
Aevann1 f77a7b7cfc fixed double quoting and triple quoting, etc 2022-06-19 20:21:25 +02:00
Aevann1 3eb788103c allow only ascii characters in links (https://rdrama.net/comment/2150032) 2022-06-19 19:25:55 +02:00
Aevann1 5ddde69ac9 greentext fix 2022-06-19 17:22:06 +02:00
Aevann1 45b1b61760 added greentext 2022-06-19 17:05:50 +02:00
Aevann1 56f8cf793e give visible bots a body column (so their comments are searchable)
+ don't sanitize zoz/longpostbot/aj comments
2022-06-18 17:37:01 +02:00
Aevann1 0fb48bc380 make reddit_notifs_jl_min default to be 1 2022-06-16 16:15:24 +02:00
Aevann1 cab92d3c24 add marsey.cat to safe list 2022-06-16 14:36:43 +02:00
Snakes 46520a9f8c Site-specific: change lotto for PCM. 2022-06-15 22:23:21 -04:00
Aevann1 cdcef7d01d Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-15 15:32:55 +02:00
Aevann1 ff9c7c17fb readjust prophet muhammed (ﷺ) slur filter 2022-06-15 15:32:52 +02:00
Snakes dfe0c64d99 Deduplicate site-specific constants, add SNAKES_ID. 2022-06-14 23:39:37 -04:00
Snakes 3301e238d6 Content: alphabet emoji, christian list. 2022-06-14 14:37:45 -04:00
Aevann1 0f49c8e32f replace spaces with tabs 2022-06-13 20:33:25 +02:00
Aevann1 f4aa70cc74 Revert "Add user title coin cost parameter."
This reverts commit dece3fd460.
2022-06-13 20:10:53 +02:00
Snakes f76b94b58d Content: keywords updates. 2022-06-11 22:08:48 -04:00
Aevann1 831344b723 small image embed improvements 2022-06-11 14:21:59 +02:00
Aevann1 1f42d228c1 remove 'apnic' from word list 2022-06-11 11:27:55 +02:00
Aevann1 654ddc4157 re-refactor normalize_url 2022-06-10 22:02:15 +02:00
Aevann1 36a1797276 escape / in imgur_regex 2022-06-10 21:04:25 +02:00
Aevann1 4910681c6f make the default HOLE_COST 0 (for testing purposes) 2022-06-10 20:14:24 +02:00
Aevann1 6a18c31ced exclude localhost from reddit notifs 2022-06-10 17:30:30 +02:00
Aevann1 774e079942 extend reddit notifs to ALL SITES 2022-06-10 17:25:03 +02:00
Aevann1 5db4bd1023 made CARP_ID to be 0 on new sites 2022-06-10 16:44:05 +02:00
Aevann1 3e365484fd refactor lottery a little bit + expand it to all of marsey's empire 2022-06-10 15:30:25 +02:00
Snakes 4db48a6ec9 Separate modaction notifs from inbox. 2022-06-10 08:28:46 -04:00
Snakes 8709ca816d Add Y'all Seein' Eye award v2 for offsitementions.
Reusing the assets and design for the ill-fated YSE in a0f441a67d.
This time, the award provides access to our offsite mentions (reddit
notifs).
2022-06-10 07:12:19 -04:00
Snakes bea6d82b61 Lottery: fix granted value, zero royalty.
grant_lottery_tickets_to_user incorrectly deposited the full ticket
value into manager account, not just the net value.

Additionally, royalty rate has been set to zero because Chapose won
the first lottery and grifting 8% that could instead go into the
prize pool seems unwarranted given that.
2022-06-10 06:15:37 -04:00
Snakes 5f7b38b477 Refactor stat timers, award timers.
Prior to this comment, the every-1d cron.py command was broken due
to lack of proper stats import. However, while refactoring this, it
was convenient to move other recurring tasks that had been stuffed in
odd places--not least `stats(...)`--into the new cron system. This
entailed a number of refactorings of other things.

1. Move stats(...) from static.py to helpers/stats.py.
2. Move hole inactivity purge task from stats(...) to routes/subs.py.
3. Move bot award timer checks from stats(...) to helpers/awards.py.
4. Unify award timer logic formerly in routes/front.py into the new
   helpers/awards.py.
2022-06-10 05:47:41 -04:00
Snakes dc7f13304e Add following holes for notifications. 2022-06-09 16:24:24 -04:00
Snakes ed240735fb Improve slur replacer performance, part deux.
h/t @official-techsupport again for finding another optimization.
We are now cumulatively at about 70% speedup over original.
It remains one of the hottest paths of the codebase in relative
terms, but its absolute performance demands have decreased enough
to buy us potentially substantial time on it.
2022-06-07 21:56:14 -04:00
Snakes da82ea81d8 Improve slur replacer performance.
h/t @official-techsupport for digging into the regex performance and
coming up with one that greatly reduces backtracking. We see an
approximately 2x speedup under typical loads, which proves to be a
major overall savings in performance. Previously, censor_slurs was,
second to ORM DB accesses, by far the most time-consuming function
in the codebase under typical loads. It's still not ideal, but it is
much better.

Future options to improve this critical path further would be:
  1) Precompute a slur-replaced HTML, rather than recomputing
     each pageload. Storage is cheap.
  2) Tokenize the HTML and replace plaintext words using O(1)
     exact-match lookups to a dict.
2022-06-07 21:16:58 -04:00