Commit Graph

445 Commits (a3fa96242cecc298e3f3a303ab68cfe8bce9c0c5)

Author SHA1 Message Date
geese_suck a3fa96242c holiday event manager (actually works now edition) (#22)
Co-authored-by: Snakes <duolsm@outlook.com>
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #22
Co-authored-by: geese_suck <deandre.williams@geese-suck.us>
Co-committed-by: geese_suck <deandre.williams@geese-suck.us>
2022-11-29 20:20:26 +00:00
justcool393 0ff034b01b add typing to a bunch of routes 2022-11-26 15:00:16 -06:00
Aevann1 5e2f449df7 fix prev commit lol 2022-11-26 01:52:39 +02:00
Aevann1 c470cb7516 make shit award not give DC 2022-11-26 01:50:25 +02:00
justcool393 272e2ee936
sneed (rename procoins to marseybux) (#472)
* sneed (rename procoins to marseybux)

* literally unusable

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 18:08:29 -05:00
Aevann1 0c9ed95c55 allow me and sneks to award carp and pizzashill 2022-11-21 03:12:01 +02:00
Snakes db329f487f
User.pay_account everywhere, fix lottery payout. 2022-11-20 05:50:02 -05:00
justcool393 022a81a4b9 remove unnecessary feature_required flags, moving them to the routes import 2022-11-15 05:37:53 -06:00
justcool393 8f2f48d6d1
[DO NOT MERGE] import detanglation (#442)
* move Base definition to files.classes.__init__.py

* fix ImportError

* move userpage listing to users.py

* don't import the app from classes

* consts: set default values to avoid crashes
consts: warn if the secret key is the default config value

* card view: sneed (user db schema)

* cloudflare: use DEFAULT_CONFIG_VALUE

* const: set default values

* decouple media.py from __main__

* pass database to avoid imports

* import cleanup and import request not in const, but in the requests mega import

* move asset_submissions site check to __init__

* asset submissions feature flag

* flag

* g.is_tor

* don't import request where it's not needed

* i think this is fine

* mail: move to own routes and helper

* wrappers

* required wrappers move

* unfuck wrappers a bit

* move snappy quotes and marseys to stateful consts

* marsify

* :pepodrool:

* fix missing import

* import cache

* ...and settings.py

* and static.py

* static needs cache

* route

* lmao all of the jinja shit was in feeds.py amazing

* classes should only import what they need from flask

* import Response

* hdjbjdhbhjf

* ...

* dfdfdfdf

* make get a non-required import

* isort imports (mostly)

* but actually

* configs

* reload config on import

* fgfgfgfg

* config

* config

* initialize snappy and test

* cookie of doom debug

* edfjnkf

* xikscdfd

* debug config

* set session cookie domain, i think this fixes the can't login bug

* sdfbgnhvfdsghbnjfbdvvfghnn

* hrsfxgf

* dump the entire config on a request

* kyskyskyskyskyskyskyskyskys

* duifhdskfjdfd

* dfdfdfdfdfdfdfdfdfdfdfdf

* dfdfdfdf

* imoprt all of the consts beacuse fuck it

* 😭

* dfdfdfdfdfdfsdasdf

* print the entire session

* rffdfdfjkfksj

* fgbhffh

* not the secret keys

* minor bug fixes

* be helpful in the warning

* gfgfgfg

* move warning lower

* isort main imports (i hope this doesn't fuck something up)

* test

* session cookie domain redux

* dfdfdfd

* try only importing Flask

* formkeys fix

* y

* :pepodrool:

* route helper

* remove before flight

* dfdfdfdfdf

* isort classes

* isort helpers

* move check_for_alts to routehelpers and also sort imports and get rid of unused ones

* that previous commit but actkally

* readd the cache in a dozen places they were implicitly imported

* use g.is_tor instead of request.headers. bla bla bla

* upgrade streamers to their own route file

* get rid of unused imports in __main__

* fgfgf

* don't pull in the entire ORM where we don't need it

* features

* explicit imports for the get helper

* explicit imports for the get helper redux

* testing allroutes

* remove unused import

* decouple flask from classes

* syntax fix also remember these have side fx for some reason (why?)

* move side effects out of the class

* posts

* testing on devrama

* settings

* reloading

* settingssdsdsds

* streamer features

* site settings

* testing settings on devrama

* import

* fix modlog

* remove debug stuff

* revert commit 67275b21ab6e2f2520819e84d10bfc1c746a15b6

* archiveorg to _archiveorg

* skhudkfkjfd

* fix cron for PCM

* fix bugs that snekky wants me to

* Fix call to realbody passing db, standardize kwarg

* test

* import check_for_alts from the right place

* cloudflare

* testing on devrama

* fix cron i think

* shadow properly

* tasks

* Remove print which will surely be annoying in prod.

* v and create new session

* use files.classes

* make errors import little and fix rare 500 in /allow_nsfw

* Revert "use files.classes"

This reverts commit 98c10b876cf86ce058b7fb955cf1ec0bfb9996c6.

* pass v to media functions rather than using g

* fix

* dfdfdfdfd

* cleanup, py type checking is dumb so don't use it where it causes issues

* Fix some merge bugs, add DEFAULT_RATELIMIT to main.

* Fix imports on sqlalchemy expressions.

* `from random import random` is an error.

* Fix replies db param.

* errors: fix missing import

* fix rare 500: only send to GIFT_NOTIF_ID if it exists, and send them the right text

* Fix signup formkey.

* fix 2 500s

* propagate db to submissions

* fix replies

* dfdfdfdf

* Fix verifiedcolor.

* is_manual

* can't use getters outside of an app context

* don't attempt to do gumroad on sites where it's not enabled

* don't attempt to do gumraod on sites's where it's unnecessary

* Revert "don't attempt to do gumroad on sites where it's not enabled"

This reverts commit 6f8a6331878655492dfaf1907b27f8be513c14d3.

* fix 500

* validate media type

Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-15 03:19:08 -06:00
Aevann1 41ab1f313c move feature_required wrappers up 2022-11-14 18:14:47 +02:00
Snakes d3f25739f0 Fix ratelimit_user on 3 routes, make proper dec. 2022-11-13 07:25:57 -05:00
Snakes 8fee66c894
Reorder decorators to support f63237a9a2.
Ultimately necessary because otherwise all bots share rate limits
with each other. The somewhat haphazard ordering of decorators bothers
me, but it's functionally required.

Approaches using request context (like reading the Authorization
header in ratelimit_user) likely produce bugs all their own.
2022-11-13 05:18:52 -05:00
justcool393 aa272729f1 default ratelimit and default ratelimit slower 2022-11-13 00:43:47 -06:00
justcool393 1e25421ac9 fixed deduplication and changed to 30/minute per @TLSM 2022-11-13 00:20:19 -06:00
justcool393 80d7d5281d ratelimit_user() wrapper 2022-11-13 00:07:15 -06:00
justcool393 1d063e39ab awards: move sb check to be earlier to avoid a query in rare cases 2022-11-12 04:33:47 -06:00
justcool393 1608b3168a awards: don't allow users to award messages 2022-11-12 04:29:07 -06:00
justcool393 e3cd6c73f5 use the name styling the @Aevann1 likes 2022-11-12 04:24:08 -06:00
justcool393 c4c4076560 spider: fix bug that would instantly eat a spider award if someone was permanently spidered 2022-11-12 04:21:17 -06:00
Aevann1 a9188f5dac "This user" -> "@username" 2022-11-12 12:08:43 +02:00
Aevann1 1b162fb049 prevent ppl from wasting their progressive stack on boosted users 2022-11-12 12:07:58 +02:00
Aevann1 05b7e79b76 remove the code i added for rdrama.com 2022-11-11 15:52:18 +02:00
Snakes 8ab77eb0ee Disable non-cosmetic awards on ghost posts.
Per poll result: https://rdrama.net/post/79285/-/3049889
Permits cosmetics and pin/unpin to be used; disables all others.
2022-11-09 18:07:23 -05:00
Aevann1 282762bef8 increase vamp award duration from 1 day to 2 days (but dont advertise that this time) 2022-11-09 21:09:38 +02:00
Aevann1 471147080f make award message better 2022-11-05 05:56:01 +02:00
justcool393 a84c6b6b24 fix text 2022-11-04 21:30:33 -05:00
justcool393 0943ee064c rename is_cosmetic to cosmetic 2022-11-04 21:22:30 -05:00
justcool393 81ed8cfc81 awards: make cosmetic awards give 10% of the price to the recipient 2022-11-04 21:16:23 -05:00
Aevann1 07a12380de accomodate alt domain 2022-11-03 17:29:14 +02:00
Aevann1 f73c6d46df accomodate rdrama.com users 2022-11-02 08:31:04 +02:00
Aevann1 111c9ab208 fix this https://rdrama.life/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3007141?context=8#context 2022-11-02 05:22:16 +02:00
justcool393 6caebac946 actions: move user-only actions to useractions, which gets rid of a circular dependency 2022-11-01 18:46:56 -05:00
justcool393 651cd60aa2 marsify: make marsify awards last a day 2022-11-01 15:33:00 -05:00
justcool393 6d636e4e42 use charge_account everywhere 2022-11-01 00:25:19 -05:00
justcool393 769f20852b features: use AWARDS feature for awarding, not badges 2022-10-31 23:53:27 -05:00
Aevann1 e7e667f56f fix undeflectable awards being vaporized 2022-11-01 02:11:44 +02:00
Aevann1 1032a3193f fix bug with deflection 2022-10-30 23:27:53 +02:00
Aevann1 ea2bd29a47 fix d9ef62b9c6 2022-10-30 00:16:58 +02:00
Aevann1 3bd8384c05 fix stray space 2022-10-29 23:37:01 +02:00
Aevann1 d9ef62b9c6 prevent ppl from wasting their chud awards 2022-10-29 23:34:40 +02:00
Aevann1 5230e8e7f8 remove code that excluded me from deflector effect 2022-10-29 22:19:50 +02:00
justcool393 548f2613c7 pinprovements 2022-10-25 17:48:10 -05:00
justcool393 dbb7296dd7 stickies: allow JL2 to sticky post
stickies: unpin on removal
stickies: don't allow removed posts to be stickied
2022-10-23 17:17:49 -05:00
justcool393 0a9e7b3ef4 lawlzposts: don't allow unpin awards
lawlzposts: disable if pins feature flag is off
2022-10-23 12:14:27 -05:00
Snakes 984d8675b5
Fix rainbow award on non-rDrama sites. 2022-10-17 23:10:40 -04:00
justcool393 aa508fc076 remove discord 2022-10-16 05:42:52 -07:00
Aevann1 77312317f3 get rid of Boolean columns for permenant awards 2022-10-14 18:59:49 +02:00
justcool393 c67406b84b use site specific patron name 2022-10-12 03:45:45 -07:00
justcool393 71759e6afa 400 -> 409 2022-10-11 09:55:24 -07:00
justcool393 c0acb1722b abort a bunch of stuff where we manually returned JSON 2022-10-11 08:40:19 -07:00