Commit Graph

1515 Commits (0c5ddeb1f7ad2c798bdb513fbaa1ab6b053c7ee2)

Author SHA1 Message Date
Snakes 1c7458e111 Sanitize: modularize normalize_url, fix streamable.
Originally prompted by https://rdrama.net/post/18459/-/1984609 which
noticed that streamable.com/e/ links as posts would have another e/
added to them. This was in spite of logic in posts.py api_is_repost
and submit_post designed to specifically counteract this.
Proximal cause was a copypasta'd url.replace(...) chain which
caused the mistake before the streamable-specific logic had a chance
to avoid making it.

Solution: remove the streamable replacement from the chained statement
and create `helpers.normalize_url(url)` to get rid of the copypasta.
2022-05-25 04:43:16 -04:00
Snakes 7ead30014c Upgrade bleach to 5.0.0. 2022-05-24 20:28:36 -04:00
Aevann1 826f137a5e fsd 2022-05-25 02:22:09 +02:00
Snakes 8c3b6cece1 Add 8-ball answers, like fortune & factcheck. 2022-05-24 19:08:41 -04:00
Aevann1 4f02a72d29 fd 2022-05-25 00:43:49 +02:00
Aevann1 1734137dcd sfddsa 2022-05-25 00:29:15 +02:00
Aevann1 6631777f76 fds 2022-05-24 22:45:34 +02:00
Aevann1 e1f298deb8 sfd 2022-05-24 22:27:27 +02:00
Aevann1 2b9dcb0c6a users here now 2022-05-24 22:19:18 +02:00
Aevann1 ca18dc8bdd webm2 2022-05-24 22:09:45 +02:00
Aevann1 67b4f13d98 webm 2022-05-24 22:07:04 +02:00
Snakes d0d029a78a sanitize: Add more neo-gTLDs to TLDs tuple-list.
Per https://rdrama.net/post/70341/-/1976650 added more gTLDs that
are actually desired by site users.

Also, hard wrapped the `TLDS` and `allowed_tags` tuple-lists at a
100char hard ruler for my sanity.
2022-05-24 15:16:55 -04:00
Aevann1 bbd851210e fds 2022-05-24 17:32:49 +02:00
Aevann1 dcf1c794cc fds 2022-05-24 04:48:50 +02:00
Snakes a56ebc39dd Add 'moe' to sanitize TLDS for linkifier. 2022-05-23 16:06:01 -04:00
Aevann1 15418ec1e6 sfd 2022-05-23 21:20:58 +02:00
Aevann1 9599a7e96d fds 2022-05-23 21:13:33 +02:00
Aevann1 0bd15d3914 burgers? 2022-05-23 21:00:14 +02:00
Aevann1 89c27efd79 booba 2022-05-23 20:03:59 +02:00
Aevann1 c5413e9e53 sdf 2022-05-23 17:28:23 +02:00
Snakes cc75375c82 Un-deploy Birthgay event.
Removes temporary changes for the Birthgay 2022 event, ending
approximately at 2022-05-23 0600Z. Changes:
 - Double XP disabled.
 - Lootboxes disabled.
 - Three event awards given real descriptions and colors.
 - Partyhats: restored to cakeday-only condition and tooltip.
 - Header UI: balloons removed, text visibility outline removed,
   journoid banner reverted, marseyjam as header icon.
 - Birthgay banners: removed from template, moved to new storage dir.

Confetti, though remaining as a permanent award, has been temporarily
removed pending a less performance-intensive implementation and one
that doesn't require maintaining a third-party package in the codebase.
2022-05-23 01:48:25 -04:00
Aevann1 649f8d5323 vdffsd 2022-05-23 00:45:04 +02:00
Aevann1 0805b41394 fds 2022-05-23 00:37:59 +02:00
Aevann1 0a74a98ec5 big ass commit 2022-05-23 00:15:29 +02:00
Aevann1 3741b6caa2 fds 2022-05-22 22:14:51 +02:00
Aevann1 112a2679cc fsd 2022-05-22 22:05:44 +02:00
official-techsupport 36e0ce6e0a Handle invalid video formats better (#283) 2022-05-22 22:01:10 +02:00
Aevann1 3ae131f5d6 fds 2022-05-22 20:04:22 +02:00
Aevann1 d712b8cf94 fds 2022-05-22 20:04:11 +02:00
Aevann1 c41f6977e7 sdf 2022-05-22 20:03:54 +02:00
Aevann1 a4ca9fc1aa fds 2022-05-22 18:19:57 +02:00
Aevann1 10723940d1 sfd 2022-05-22 18:19:49 +02:00
Aevann1 969d1898b5 vid refactor 2022-05-22 18:13:19 +02:00
Aevann1 37a6ce39f5 fixing https://rdrama.net/post/69817/tfw-you-will-never-troll-harder/1961118?context=8#context 2022-05-22 12:20:11 +02:00
Snakes 3d9c302fae Blackjack: add five card charlie rule. 2022-05-20 23:08:20 -04:00
Snakes 9a23c195ed Fix overpermissive email regex. 2022-05-20 18:49:00 -04:00
Aevann1 2737a6ca47 sfd 2022-05-20 23:41:08 +02:00
Snakes 76fd1342f3 Fix @mention replacement.
Comments of the style e.g. "@TLSM / @TLSM2" would mistakenly be
`sanitize`d to have identical links only on "@TLSM", the latter
instance having a dangling 2 on the end. It seems this is purely an
issue with text formatting; alerts.py @ NOTIF_USERS had no such
issues. The root cause appears to be partly an optimization and
partly the use of str.replace without a count limit.
2022-05-20 17:04:36 -04:00
Aevann1 4a6545ef5d dfsfds 2022-05-20 16:39:46 +02:00
Aevann1 eead5570e5 fsd 2022-05-20 16:17:09 +02:00
Snakes c789f6923e Merge remote-tracking branch 'upstream/frost' into birthgay-staging 2022-05-19 17:59:35 -04:00
Snakes 5e85f34d3c Double XP enabled: actual launch timestamp. 2022-05-19 17:22:55 -04:00
Snakes 39c354c3fd Enable DXP at 2022-05-19 2200Z. 2022-05-19 17:15:39 -04:00
Snakes 69dec16f55 Shop badge discount: fix Spender, add Roller disc.
The shop discount from Big Spender badges was incorrectly implemented:
intended behavior was for 2pp per badge. However, the values in
const.py were set as if a user could only have one Spender badge at
once, while user.py @ discount was implemented as if they were
additive. Since users factually do have multiple big spender badges,
the values in const were adjusted to reflect this fact.

Also, lootbox Roller badges now each offer a 1pp discount.
users.py @ discount was improved to check against the `discounts`
keys for appropriate badges, rather than a hardcoded list.
2022-05-19 13:41:04 -04:00
Aevann1 44cd7f4a92 fds 2022-05-19 09:49:15 +02:00
Aevann1 15f0b963c7 fc 2022-05-18 20:45:04 +02:00
Snakes f0c9a354e9 Implement better double XP infrastructure.
Double XP now has a constant for unixtime to start. Logic around
DXP is designed to only apply to votes made after DOUBLE_XP_ENABLED.
This prevents an exploit in the old implementation where spam voting/
unvoting a post made prior to the DXP start could farm 300 DC/hr/alt.
Also it's more maintainable and comports with the coin_delta changes
to prevent self-vote coin changes.
2022-05-18 00:54:05 -04:00
Snakes b51ab09b27 Lootboxes: re-enable for birthgay, improve.
Re-enable lootboxes in const.py, and update their contents in
awards.py. Additionally, improve appearance in shop.

Upon purchasing a lootbox, users now receive a message informing
them of the contents thereof.

Lootbox backend now properly uses CARP_ID (and checks for the
existence thereof correctly).

Also, minor changes to how const.py whitelists awards.
2022-05-17 22:10:04 -04:00
Snakes f9bfb6ddc6 Update birthgay award descs, ricardo price. 2022-05-17 20:04:16 -04:00
Aevann1 c3cce7aaa5 Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-05-17 21:58:43 +02:00
Aevann1 3491c9187d pls review 2022-05-17 21:58:41 +02:00
HappyDOGE e7349aec98 Fix <a> tag link injection, don't throw a ValueError when href attr is missing, properly count marseys (their usage wasn't counted for 20 days :marseygasp:) (#265) 2022-05-17 20:59:07 +02:00
Snakes 9854ed863f Revert word filter * 'escapes'. 2022-05-17 14:34:54 -04:00
Aevann1 ea7c4f833a fg 2022-05-17 18:53:44 +02:00
Aevann1 c80dcaf706 sfd 2022-05-17 18:16:56 +02:00
Aevann1 e0c1e6b4cd sfd 2022-05-16 22:57:47 +02:00
Snakes 42e0b77ca7 Add <audio> support to sanitize.py.
Parallels the decisions made with <video>.
2022-05-15 18:47:37 -04:00
Aevann1 50b1ed8aa0 fds 2022-05-15 10:45:57 +02:00
Aevann1 ed0d225554 sfd 2022-05-14 15:11:11 +02:00
Absinthe a829b156d7 #Factcheck Replies (#262)
Replies for #factcheck.
2022-05-12 16:21:20 +02:00
Absinthe c3ae481048 #factcheck (#261)
Like #fortune but to check facts.
2022-05-12 16:21:11 +02:00
DrTransmisia ba1a5358c8 Bussysussy (#258)
* LE SCHIZOPHRENIC ID HAS ARRIVED :MARSEYCRAZYTROLL:

* other batch of tags
2022-05-11 13:05:32 +02:00
Aevann1 fac797006e sf 2022-05-10 14:14:09 +02:00
Aevann1 9bd8fcbd1c sf 2022-05-10 09:20:49 +02:00
Aevann1 b71ae6cc74 sf 2022-05-09 13:21:49 +02:00
TLSM 607e5c0171 Fix blackjack doubledown & insure using wrong currency. (#253)
In blackjack, the new double-down and insurance features erroneously
always used coins, even when gambling with mbux.
2022-05-09 01:51:00 +02:00
geese 507d4929f7 brasil #1 2022-05-08 13:37:30 -04:00
Aevann1 9a7c8f813f sfd 2022-05-08 11:06:01 +02:00
Aevann1 666870e0a3 fsd 2022-05-08 07:14:24 +02:00
Aevann1 4cc4f8f14f sfd 2022-05-08 06:01:42 +02:00
Aevann1 028563ad7d bgd 2022-05-07 08:04:14 +02:00
Aevann1 1b86af8def fg 2022-05-07 07:28:51 +02:00
Aevann1 f2039d7713 sfd 2022-05-07 06:13:19 +02:00
Aevann1 f876092e9e dg 2022-05-06 01:45:41 +02:00
Aevann1 22c2e1240e jh 2022-05-06 01:44:30 +02:00
Aevann1 bb43be278b dg 2022-05-05 23:49:27 +02:00
TLSM 1137d56de7 Disable chudtexting in quotes. (#245)
Chose to split text into lines because Python regex supports neither
variable-width nor infinite-width negative lookbehinds. This precludes
a simple pure regex solution. Since all replacements are done at the
word level, this has no obvious ill effects.
2022-05-05 22:47:13 +02:00
TLSM 110278d87f Add typekit to approved hosts. (#243) 2022-05-05 09:57:34 +02:00
carpathianflorist 902a8fa7e3 minor word filter update 2022-05-05 00:19:59 -04:00
geese 02928305ed aaa 2022-05-04 21:29:59 -04:00
Aevann1 6b10d097a2 mn 2022-05-05 01:09:46 +02:00
Aevann1 024e5770af fsd 2022-05-04 22:51:56 +02:00
Aevann1 53702d5f13 dup 2022-05-04 05:14:14 +02:00
Aevann1 572b8bcf65 jk 2022-05-03 21:07:57 +02:00
Aevann1 095e5cb0af sanitize 2022-05-03 21:07:15 +02:00
Aevann1 bb33eaf54b sfd 2022-05-02 22:02:22 +02:00
Aevann1 df90e71f20 fsd 2022-05-02 21:30:12 +02:00
Aevann1 5eb6491e25 fgd\ 2022-05-02 07:06:43 +02:00
Aevann1 94e6eb1ef6 sdf 2022-05-02 00:28:51 +02:00
Aevann1 a4b0565b5a sfd 2022-05-01 23:48:53 +02:00
outruncolors 0ff7bdc28a Added doubledown and insurance functionality (#235)
* Added doubledown functionality

* Add insurance
2022-05-01 20:24:01 +02:00
Aevann1 e73fcbd56a sfd 2022-04-29 17:17:14 +02:00
Aevann1 2d4cf226e4 fds 2022-04-29 16:52:00 +02:00
Aevann1 d0116ff2f8 sfd 2022-04-28 01:16:24 +02:00
Aevann1 952fdec513 fds 2022-04-27 18:28:00 +02:00
Aevann1 47978226e1 df 2022-04-27 17:15:41 +02:00
Aevann1 8296a580d1 xcv 2022-04-27 17:09:37 +02:00
Aevann1 583765f259 czx 2022-04-27 17:03:25 +02:00
float-trip d85951d912 add :@userpat: emojis (#231)
* refactor emoji formatting

* add user patting
2022-04-27 16:46:47 +02:00
Aevann1 2f04364f5b fd 2022-04-26 15:15:01 +02:00
Aevann1 adf6d4bfee sdf 2022-04-26 01:03:07 +02:00
Aevann1 ccff08057a sfd 2022-04-26 01:00:55 +02:00
Aevann1 5c21180705 Revert "vxc"
This reverts commit 4d0c7ba456.
2022-04-25 23:59:12 +02:00
Aevann1 4d0c7ba456 vxc 2022-04-25 18:38:06 +02:00
Aevann1 ddbafe7d78 vcx 2022-04-25 17:48:36 +02:00
Aevann1 e60fe0bcd6 gf 2022-04-25 16:51:40 +02:00
Aevann1 b554065c49 vcx 2022-04-24 19:30:05 +02:00
Aevann1 457a717075 fds 2022-04-24 00:09:25 +02:00
Aevann1 ba503e600f fds 2022-04-23 00:53:24 +02:00
Aevann1 37ecda7872 fds 2022-04-23 00:52:49 +02:00
Aevann1 e384356b33 fsd 2022-04-22 21:41:37 +02:00
Aevann1 e391ef7a29 fds 2022-04-22 21:22:11 +02:00
Aevann1 f6d5fca338 fds 2022-04-22 20:32:11 +02:00
Aevann1 4460fdf5e4 fds 2022-04-22 19:38:55 +02:00
Aevann1 d15d7c7d93 fds 2022-04-22 18:06:34 +02:00
Aevann1 e3b00f6c89 fsd 2022-04-22 17:17:10 +02:00
Aevann1 6b97488355 fds 2022-04-22 17:08:42 +02:00
Aevann1 f50fa03958 fsd 2022-04-22 16:36:46 +02:00
Aevann1 5c842fdb2a sfd 2022-04-22 16:20:03 +02:00
Aevann1 5cf645f329 fds 2022-04-22 16:19:27 +02:00
Aevann1 f30b97d513 fds 2022-04-22 16:15:17 +02:00
Aevann1 ac4da7516d fsdfds 2022-04-22 15:23:56 +02:00
Aevann1 1ec4f1375d fds 2022-04-21 00:56:16 +02:00
Aevann1 88f9ac8aed fds 2022-04-21 00:55:05 +02:00
Aevann1 ca268c1ac5 fds 2022-04-20 15:55:48 +02:00
Aevann1 74a291e975 fds 2022-04-20 00:24:43 +02:00
Aevann1 cc3788bd8d fds 2022-04-20 00:23:25 +02:00
Aevann1 5be791e21d dfs 2022-04-20 00:17:50 +02:00
Aevann1 aa498d89c7 gfd 2022-04-19 21:13:36 +02:00
Aevann1 89f336a3bf sdf 2022-04-19 20:29:08 +02:00
Aevann1 0705e96770 fds 2022-04-18 20:45:18 +02:00
Aevann1 0e74b54424 fsd 2022-04-18 20:25:14 +02:00
Aevann1 d7fa942d85 fds 2022-04-18 18:01:03 +02:00
Aevann1 743215e2d0 fds 2022-04-18 15:46:45 +02:00
Aevann1 69d285b0f3 fds 2022-04-18 01:00:17 +02:00
Aevann1 c7d3401b62 fds 2022-04-18 00:47:30 +02:00
Aevann1 ad0c050cc3 fdsfd 2022-04-18 00:31:39 +02:00
Aevann1 8214e2c6f9 fds 2022-04-18 00:13:37 +02:00
Aevann1 d91cb91e07 fsd 2022-04-17 23:59:30 +02:00
Aevann1 a8bff09b9e fds 2022-04-17 23:59:05 +02:00
Aevann1 15f5216c40 dfsfsd 2022-04-17 23:52:36 +02:00
Aevann1 9c0441aef9 fsd 2022-04-17 23:46:29 +02:00
Aevann1 e06cc3c382 fsd 2022-04-17 23:10:56 +02:00
Aevann1 0fafdc16ff fds 2022-04-17 23:10:21 +02:00
Aevann1 78ea56837f fds 2022-04-17 22:20:40 +02:00
Aevann1 0b69ed8cb6 fds 2022-04-17 17:32:56 +02:00
Aevann1 a77ff6582d fsd 2022-04-17 17:31:09 +02:00
Aevann1 7c18a97d56 fds 2022-04-17 16:59:18 +02:00
Aevann1 e63dcc0c74 fds 2022-04-17 15:53:00 +02:00
Aevann1 c527eb03d1 fds 2022-04-17 15:22:55 +02:00
Aevann1 2c27fed388 fds 2022-04-17 01:22:48 +02:00
Aevann1 5e18eb7222 fds' 2022-04-17 01:06:53 +02:00
Aevann1 520f2e32f0 fsd 2022-04-17 01:00:32 +02:00
Aevann1 d11f430e97 fsd 2022-04-17 01:00:21 +02:00
Aevann1 3eb53f4d07 fds 2022-04-17 00:43:50 +02:00
Aevann1 39c374a90d fds 2022-04-17 00:42:12 +02:00
Aevann1 5c7c876218 dfs 2022-04-16 22:16:09 +02:00
Aevann1 248d3c7d25 fdssfd 2022-04-16 17:30:35 +02:00
Aevann1 2513fedeb0 fsd 2022-04-16 17:15:10 +02:00
Aevann1 e547ad90cc fds 2022-04-16 17:04:34 +02:00
Aevann1 c6230e5f50 fsd 2022-04-16 16:58:07 +02:00
Aevann1 d9a590ef9a fsd 2022-04-16 02:18:41 +02:00
Aevann1 78530d6d17 fds 2022-04-16 01:06:13 +02:00
Aevann1 9c9b600afe fds 2022-04-16 00:42:42 +02:00
Aevann1 7047953ce7 fdsdfs 2022-04-16 00:39:17 +02:00
Aevann1 99cb01d9fc fdsfds 2022-04-15 18:28:08 +02:00
Aevann1 a1d7849798 fds 2022-04-15 17:35:11 +02:00
Aevann1 5a6ac9d8b2 fsd 2022-04-12 22:45:07 +02:00
Aevann1 579e81de2a site settings 2022-04-12 21:05:50 +02:00
Aevann1 9a5a07f6c3 fds 2022-04-10 20:46:55 +02:00
Aevann1 c0c0b3a134 fsd 2022-04-10 18:27:27 +02:00
Aevann1 e6c0044d35 fart 2022-04-10 02:37:45 +02:00
Aevann1 15a02cf3cd fds 2022-04-10 01:07:03 +02:00
Aevann1 ef8068e644 fsd 2022-04-09 18:52:25 +02:00
Aevann1 77175051ac gd 2022-04-07 01:50:32 +02:00
Aevann1 858c53e8e4 fd 2022-04-07 00:54:09 +02:00
Aevann1 496858a216 fds 2022-04-06 23:21:07 +02:00
Aevann1 3575201f66 fds 2022-04-06 23:15:43 +02:00
Aevann1 ee84c0a796 2022-04-06 21:55:12 +02:00
Aevann1 9a75ddee97 dogecore 2022-04-05 17:50:56 +02:00
Aevann1 37e4d9e848 fds 2022-04-05 01:38:05 +02:00
Aevann1 bd712dabfe fgd 2022-04-04 22:05:10 +02:00
Aevann1 c26091c9cc I have no idea what I'm doing 2022-04-04 19:23:35 +02:00
Aevann1 a60a061cc9 doecore 2022-04-04 12:23:31 +02:00
Aevann1 889a8948c4 fsd 2022-04-04 03:41:20 +02:00
Aevann1 da5ea2b3a2 fs 2022-04-03 22:17:55 +02:00
Aevann1 8baefa2572 fsd 2022-04-03 18:08:54 +02:00
Aevann1 8fa660a241 sdf 2022-04-03 17:34:21 +02:00
Aevann1 7713fd891d fsd 2022-04-02 19:11:35 +02:00
Aevann1 ae82ada424 fsd 2022-04-02 18:54:27 +02:00
Aevann1 6b58661855 tabs 2022-04-01 20:38:31 +02:00
Aevann1 3541bd8654 fsd 2022-04-01 15:17:46 +02:00
Aevann1 5afdf57292 fds 2022-04-01 15:07:28 +02:00
Aevann1 a4e955c27c sfd 2022-03-31 22:01:46 +02:00
Aevann1 b538d2a24c gdfg 2022-03-31 18:28:53 +02:00
Aevann1 b02b27ce4f fds 2022-03-31 17:00:57 +02:00
Aevann1 3a3157def3 df 2022-03-29 19:32:36 +02:00
Aevann1 312a6b75f7 tre\ 2022-03-28 12:06:57 +02:00
Aevann1 a30ccc8af5 fds 2022-03-27 20:42:02 +02:00
Aevann1 467c3f45cf dg 2022-03-27 16:49:44 +02:00