Commit Graph

3897 Commits (cd811d7b9d99a21995f6fe31077030627aa23a94)

Author SHA1 Message Date
Aevann1 96d7df327f Revert "CF verification"
This reverts commit 62644f452f.
2022-06-18 01:19:42 +02:00
Aevann1 62644f452f CF verification 2022-06-18 01:18:06 +02:00
Aevann1 80852cc395 specify encoding when reading text files 2022-06-18 00:19:18 +02:00
Aevann1 28fa03669d use f-string 2022-06-18 00:14:27 +02:00
Snakes c46f785229 Loosen auth requirement on /directory. 2022-06-17 16:38:30 -04:00
Aevann1 62d5a0d8dc Revert "use notify_mod_actions in deletion msg"
This reverts commit d7a84a2188.
2022-06-17 21:28:37 +02:00
Aevann1 d7a84a2188 use notify_mod_actions in deletion msg 2022-06-17 21:27:32 +02:00
Aevann1 e072e15819 cache profile pics for 1 day to prevent DDOS 2022-06-17 21:21:26 +02:00
Aevann1 4bae98dab0 Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-17 20:30:08 +02:00
Aevann1 2c6b6cc371 notify chadmins of hole deletions 2022-06-17 20:30:05 +02:00
Snakes b995b4ddfb Amend 9b17bb1cfe78: fix userpage for logged-out.
The previous fix to shadowbanned users not being able to view their
own profile broke userpages for logged out users (and filled the log
up with 500s) due to sloppy logic around accessing v.id. This has
been remedied.
2022-06-17 02:30:20 -04:00
Snakes 9b17bb1cfe Fix shadowbanned 404 on own profile. 2022-06-16 20:06:00 -04:00
Aevann1 57e63a2d8b hide autopoller/autobetter/autochoice from /comments 2022-06-16 14:34:35 +02:00
Snakes 7e54f858d3 Amend f8ae2a3d17c6: revert >= logic, fail loudly.
First, the apparent errors with >= 9 and 99 in the Marseys and
referrals code after the refactor are not actually bugs: they were
bug fixes mixed in with the refactor to fix an off-by-one.

Next, instead of failing silently on the `not user` branch in
badge_grant, we throw a ValueError. This retains the current
behavior where users get 500s to report while also enforcing the
assertion near the edge of the function.
2022-06-15 16:32:25 -04:00
Snakes f8ae2a3d17 Amend 3bc98f0a6b84: minor logic, style. 2022-06-15 16:08:26 -04:00
Aevann1 f4a6e76ab5 add nuke and un-nuke notifications 2022-06-15 21:36:02 +02:00
Aevann1 3bc98f0a6b extend TLSM's badge_grant() to almost all instanes where badges are granted 2022-06-15 21:33:21 +02:00
Aevann1 7ec994d4b3 show gift reason in public transfer log 2022-06-15 15:36:33 +02:00
Snakes f04dffe1a7 Create directory page for sidebar megathreads.
The sidebar previously did not prioritize information as well as
desired, and the proliferation of megathreads led to a number of
icons occupying frontpage visual space despite not often being
useful to frontpage use cases. Therefore, they have been moved to
a new page.

The /directory page is predominantly created with template logic,
and it should be within the ability of our semi-technical jannie
staff to maintain.
2022-06-15 03:27:04 -04:00
Snakes 131ae3027b Content: Snappy Christian /h/truth. 2022-06-13 20:43:56 -04:00
Aevann1 cec1994ff7 ppl with code contributor badge can now make "(changelog)" posts 2022-06-13 23:41:29 +02:00
Aevann1 8e8fd8c1da catch invalid ticket quantity 500 error 2022-06-13 20:34:57 +02: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
Aevann1 07f2c0d2ca make marsey counter work everywhere (not just comments) 2022-06-13 20:05:24 +02:00
Aevann1 74a5ea88ac expand post searching to include bodies (instead of titles only) 2022-06-13 19:33:20 +02:00
Aevann1 53a8818f80 fix snappy gambling 2022-06-13 19:30:04 +02:00
Aevann1 f8c60e61f9 expand modaction notifications to ban, unban, and grass awards
(but only if used by JL3, since they can print awards willy nilly)
2022-06-13 19:22:30 +02:00
Aevann1 dd09eff539 fix oversight in ba883a5340 2022-06-13 18:50:30 +02:00
Aevann1 d09634bf20 make log show 0 actions when u filter by a kind that doesn't exist
(instead of showing all actions)
2022-06-13 18:41:46 +02:00
Aevann1 c8e0d8b1c3 catch email exception 2022-06-13 18:28:37 +02:00
Aevann1 ba883a5340 give chadmins notifications for unbans and unremovals 2022-06-13 16:40:16 +02:00
Aevann1 cf827bdf38 unhide some mod actions from non-jannies 2022-06-13 15:37:46 +02:00
Snakes 3ebba0465a Close more shadowbanned user info leaks.
1. Missed the notif for unfollowing a non-fish'd user in fb52003404.
2. "Get Them Help" button showed username.
3. Gift coins/mbux showed username and allowed a message.
4. Global block list showed username.
5. User profile appeared to logged-out and non-jannies.
2022-06-12 23:03:36 -04:00
Snakes fb52003404 Hide block & follow notifs from shadowed. 2022-06-12 22:11:55 -04:00
Snakes acde2c856b Enable JL2 viewing shadowbanned comments. 2022-06-12 05:48:27 -04:00
Aevann1 b94fabddb4 rDrama -> SITE_NAME 2022-06-11 16:39:00 +02:00
Aevann1 1212804fbf exclude pings from link counter 2022-06-11 15:19:39 +02:00
Aevann1 a082105ab8 remove weird trailing tabs 2022-06-11 11:56:16 +02:00
Aevann1 c0da5ed7d9 make twitter links have "nofollow noopener norefeerrer" 2022-06-11 11:53:53 +02:00
Aevann1 964318fe5d fix push notifications 2022-06-11 00:14:03 +02:00
Aevann1 f7cce1469c Revert "use redis for site settings instead of a json file"
This reverts commit a7b67db555.
2022-06-10 23:52:32 +02:00
Aevann1 a7b67db555 use redis for site settings instead of a json file 2022-06-10 23:22:09 +02:00
Aevann1 9fb33d064a disallow #21262c from being used as a name color or a flair color 2022-06-10 22:52:20 +02:00
Aevann1 87ba1ba50e fix benefactor exploit (thx sneks my beloved) 2022-06-10 22:40:04 +02:00
Aevann1 d84a4c7ce9 convert monthly marseybux into a cron task 2022-06-10 22:23:01 +02:00
Aevann1 760aa397c8 refactor monthly marseybux logic a little bit 2022-06-10 22:13:20 +02:00
Aevann1 b4b4ab1e9a when granting monthly awards, add 5 days to the date
so when I grant awards on 29/5 for example,
it says in the notification "for the month of July" instead of "for the month of May"
extremely minor but I have autism
2022-06-10 22:09:59 +02:00
Aevann1 654ddc4157 re-refactor normalize_url 2022-06-10 22:02:15 +02:00
Aevann1 f9a0cff350 make the page always jump to the comment you wanna view 2022-06-10 20:01:12 +02:00
Snakes 642f5e7a1c Holes: remove JL3 on /create_hole 2022-06-10 12:59:25 -04:00
Aevann1 e53a286d49 notify mods of the deletion of their holes 2022-06-10 17:41:33 +02:00
Aevann1 abae90fbfd fixed bug with snappy gambling 2022-06-10 16:44:30 +02:00
Aevann1 2db414f12d Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-10 14:48:14 +02:00
Aevann1 2b82f95a98 Make hole cost constant instead of variable 2022-06-10 14:48:11 +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 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
Aevann1 934b631730 rename /create_sub to /create_hole 2022-06-10 00:29:45 +02:00
Aevann1 3a9f3c329f fix hole deletion 2022-06-10 00:13:33 +02:00
Aevann1 10f3d4035d delete inactive holes 2022-06-10 00:07:17 +02:00
Snakes dc7f13304e Add following holes for notifications. 2022-06-09 16:24:24 -04:00
Aevann1 c100ed415c increase edit_post ratelimit so it doesnt fuck with drafts 2022-06-09 20:09:18 +02:00
Aevann1 63c16a867a make the ratelimit for editing much lower to cut
down on mass overwriting
2022-06-09 18:10:25 +02:00
Aevann1 cea253a52c don't notify me anymore of carp posts 2022-06-09 15:29:13 +02:00
Snakes b94e71450f Add un-holing to hole report command. 2022-06-09 02:42:52 -04:00
Snakes 995375decc Refactor reddit mentions, move to cron.
The reddit mentions system contained much duplicated code and was
grafted onto the post thumbnail pipeline to achieve semi-regular
invocation. Instead, we now run it through the new cron system,
and the duplicate code has been refactored out.
2022-06-07 10:42:24 -04:00
Snakes 152315f73e cron: Move charts from static to helper. 2022-06-07 08:31:24 -04:00
Aevann1 d431ae1ecd re-prioitize effortposts (with a lot of links) in the frontpage 2022-06-07 13:26:39 +02:00
Aevann1 aaeb09fd91 add me to WPD discord too 2022-06-07 12:55:50 +02:00
Aevann1 1bce1c273f no more 500 error 2022-06-07 12:32:48 +02:00
Aevann1 4a1e6cc726 a 500 error is much better than an XSS, bro 2022-06-07 12:03:51 +02:00
Aevann1 f966262b97 Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-07 11:18:12 +02:00
Aevann1 d761fc27cd Revert "Make CARP_ID's flair uneditable by others."
This reverts commit c2266985b7.
2022-06-07 11:18:09 +02:00
Snakes 70b96162a7 Fix banned domain info leak in modlog. 2022-06-06 22:18:56 -04:00
Snakes dece3fd460 Add user title coin cost parameter. 2022-06-06 19:02:23 -04:00
Aevann1 4aeb438c6b extend removal notifs from only me to all Lvl3 jannies 2022-06-06 07:50:38 +02:00
Aevann1 282f8d885c Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-06-06 07:42:21 +02:00
Aevann1 b2ec368a7e give me a better discord role 2022-06-06 07:42:19 +02:00
Snakes 7556fe8988 Add lottershe badge logic, badge helper. 2022-06-06 00:07:38 -04:00
Aevann1 43dbcadc6b add me into jannycord 2022-06-05 17:05:43 +02:00
Snakes 0e0a8d391b Amend 20b136909: string comparison bug.
Fixes logic which failed because user_id was a string which I
improperly treated as an integer for comparisons.
2022-06-04 23:58:03 -04:00
Snakes c2266985b7 Make CARP_ID's flair uneditable by others.
This is a kludge solution that sticks special case logic in places
it shouldn't be. However, community management demands necessitate it
quickly. Of the three ways to change a flair (customtitle), this
prevents using flairlocks and admin flair editing on the user with
CARP_ID. Only the user himself may change his flair through settings.
2022-06-04 23:34:44 -04:00
Snakes 843ff51ace Make post rate limit site-specific. 2022-06-02 22:10:59 -04:00
Snakes 379ae664a3 Make PIN_LIMIT a per-site constant. 2022-06-02 19:45:33 -04:00
outruncolors dfd521b652 Add quantity field to purchasing tickets / Make Chapose the beneficiary (#302)
* Add quantity field to purchasing tickets

* Remove height requirement for div (manlets  seething)
2022-06-02 19:19:49 -04:00
float-trip 58c4b62163 Some fixes (#300)
* Narrow emoji_regex

* Fix mirrored pat emojis

* Fix ban icon on posts/comments
2022-06-02 19:18:10 -04:00
Snakes df3127785a Rename 'shit emojis.json' for sanity. 2022-06-02 05:15:41 -04:00
Snakes 1d49012c16 Revise 16587cdf7cf5, expand assetcache.
Assetcache: now supports js/userpage.js & js/userpage_v.js.
The three userpage*.html templates now implement it.

Revising gift messages 16587cdf7cf5:
  - routes/users.py: Deduplicate code, more descriptive var name.
  - templates/userpage.html: Move post-tax gift line below reasons
    box. Ultimately just an aesthetic change.
2022-06-01 00:11:23 -04:00
Ubuntu 453d5f57a3 added a gift message to go with coin and bux transfers 2022-06-01 00:10:33 -04:00
Snakes 49622b3268 Lottery: add admin participants listing. 2022-05-31 23:20:39 -04:00
outruncolors c2f598a17f Move lottery to own page (#296) 2022-05-30 22:40:38 -04:00
Snakes 04a878a8c4 Make betting polls respect can_gamble. 2022-05-30 08:13:11 -04:00
Snakes e32a4bda48 Add set/unset nsfw on comment to modlog. 2022-05-30 08:00:16 -04:00
Snakes 75758dd511 Feeds: make RSS valid, part trois.
Hopefully finishes the RSS fix saga. This one done in-house rather
than by patch, as 5d6d4f9ca0 and 29fdc774a9 had been.

This final change ensures the <updated> tag is always used, even
for un-edited posts. This appears to pass the W3C Validator using
local test data. We shall see how it behaves with data on prod.
2022-05-30 07:27:52 -04:00
Snakes 29fdc774a9 Feeds: make valid, part deux.
Continuation of 5d6d4f9ca0. Again, h/t to our friends at WPD
for providing a patch.
2022-05-30 06:58:42 -04:00
Snakes 81e19b1aed Add can_gamble user setting.
Users now have a toggleable can_gamble setting which disables their
ability to use all chance-based gains on the site: viz. slots,
blackjack, the lottery, and treasure chests.

This only applies on invocation of commands that start gambling
games, so it should cause no bugs when toggled with e.g. active
blackjack games.

This was added for the benefit of users with actual problems with
gambling, be they past addiction or religious conviction. All future
gambling features are humbly requested to respect it.
2022-05-30 05:32:45 -04:00
Snakes 5d6d4f9ca0 Feeds: make RSS valid.
Patch provided via c/o tejmar of WPD.
Intended to fix the invalid RSS format which caused issues when
using the feeds with Discord and Telegram.
2022-05-30 04:30:57 -04:00
Snakes 1f4c3ea6b0 Lottery: increase short-term ratelimit. 2022-05-30 00:31:48 -04:00
Snakes 5b6ba1ac82 Merge remote-tracking branch 'mccoxmaul/add-lottershe' into frost 2022-05-29 23:52:04 -04:00
Aevann1 de539ab7e5 fixed a bug that caused 500 errors when jannies left the input area for days empty when they chudded someone
also removed some useless code for checking admin status on alts (why did I add this)
2022-05-30 05:30:32 +02:00
Aevann1 e5dbc9bfdd made it so ALL comments on ghosted posts are ghosted too, this includes the hidden poll comments
that way, the poll voters will be hidden and we can have anonymous polls

context: https://rdrama.net/votes?link=t3_2007526
2022-05-30 05:26:52 +02:00
Aevann1 27d81f6506 for rdrama.net, made it so the weekly chart always start before the site got made, and added variable chart width to accomodate that 2022-05-30 05:16:48 +02:00
Outrun Colors, LLC 9f384bf548 Remove extraneous route logic 2022-05-29 22:12:13 -05:00
Aevann1 b2c011a7ba Give me a notification whenever one of the other jannies removes a post or comment 2022-05-30 05:01:03 +02:00
Aevann1 aff30db1fe make sure the post/comment for which someone was banned is linked everywhere (for convenience) 2022-05-30 04:55:51 +02:00
Outrun Colors, LLC b9dc28e6d1 Don't show lotteries on the sister sites 2022-05-29 20:43:16 -05:00
Outrun Colors, LLC a0cc7e1cf6 Move more stuff to proper location 2022-05-29 19:49:14 -05:00
Aevann1 ecb4a56047 fixed global variable bug in /stats 2022-05-30 01:01:40 +02:00
Aevann1 3e472c74e0 Removed "make admin" on rdrama.net 2022-05-29 20:36:51 +02:00
Snakes 0a73083e8a Add settings toggle for UI animations. 2022-05-29 03:08:28 -04:00
Outrun Colors, LLC 562202b38d Reorganize route logic 2022-05-29 01:06:39 -05:00
Outrun Colors, LLC bef0b0ff6d Add participants and field updating 2022-05-29 01:01:45 -05:00
Outrun Colors, LLC 1a55a7670e Send notifications to winners and losers 2022-05-28 23:23:20 -05:00
Outrun Colors, LLC 469c39dca6 Configure admin section and purchasing a ticket full flow 2022-05-28 22:33:44 -05:00
Outrun Colors, LLC cf7ee615e6 Add skeleton for route interactions 2022-05-28 19:02:35 -05:00
Outrun Colors, LLC 4eb9095ae5 Initial connection of front-end to back-end. 2022-05-28 18:26:30 -05:00
Aevann1 6584919d41 sdf 2022-05-28 22:25:28 +02:00
Aevann1 851eff0f18 sdf 2022-05-28 19:50:48 +02:00
Aevann1 709c756660 fds 2022-05-28 16:55:22 +02:00
Aevann1 cd2380fb33 fds 2022-05-28 04:20:31 +02:00
Aevann1 1d0da9df3c sfd 2022-05-28 02:46:44 +02:00
Aevann1 4e5f7935dd dfs 2022-05-28 02:30:07 +02:00
Aevann1 4c112b1edb dsf 2022-05-27 23:31:02 +02:00
HappyDOGE d6b4c3b166 Added offline service worker (serves a static webpage when no internet connection is present) (#285)
based
2022-05-27 21:23:01 +02:00
Aevann1 384afb125a fsd 2022-05-27 17:28:30 +02:00
Aevann1 66b3efab36 award refactor 2022-05-27 01:08:23 +02:00
Aevann1 02e9d2f2b5 fsd 2022-05-26 23:08:31 +02:00
Aevann1 13fcc1881a dfsfds 2022-05-26 23:07:06 +02:00
Aevann1 758a30e166 fsd 2022-05-26 22:53:24 +02:00
Aevann1 d4f7f5497b fds 2022-05-26 22:49:36 +02:00
Aevann1 630996faee gfd 2022-05-26 22:31:08 +02:00
Aevann1 8ba5f07bb6 sdf 2022-05-26 22:17:09 +02:00
Aevann1 0ac85b3192 fsd 2022-05-26 22:14:47 +02:00
Aevann1 f72015382a crgd is a king 2022-05-26 22:04:39 +02:00
Aevann1 f7dea74b37 fds 2022-05-26 21:19:33 +02:00
Aevann1 1e8c00f6fe fsd 2022-05-26 21:15:24 +02:00
Aevann1 957cf5ba8f dfs 2022-05-26 20:09:44 +02:00
Aevann1 c5ace85f9b fsd 2022-05-26 17:57:24 +02:00
Aevann1 163267c88c Revert "Add Y'all Seein' Eye award."
This reverts commit a0f441a67d.
2022-05-26 02:51:42 +02:00
Aevann1 acc4e3503f Merge branch 'frost' of https://github.com/Aevann1/Drama into frost 2022-05-26 01:46:40 +02:00
Aevann1 32bc1b3c2a afsfds 2022-05-26 01:46:38 +02:00
Snakes a0f441a67d Add Y'all Seein' Eye award.
Adds award to enable viewing profile visitors for non-mops and
non-patrons. This commit should encompass all frontend, backend, and
database changes necessary. Perhaps usable as a model for other
user upgrade flag awards.
2022-05-25 19:44:34 -04:00
Aevann1 a749a7eea9 fds 2022-05-26 01:43:42 +02:00
Aevann1 7c858c6439 fds 2022-05-26 01:42:34 +02:00
Aevann1 b254fd77cb fsd 2022-05-26 01:25:51 +02:00
Aevann1 c8c6ec6eea dsf 2022-05-26 00:08:16 +02:00
Aevann1 1c6ca7c9e0 fds 2022-05-26 00:02:54 +02:00
Aevann1 60058c5130 fsd 2022-05-26 00:02:18 +02:00
Aevann1 8d1c9d710d fsd 2022-05-25 23:25:23 +02:00