Commit Graph

1063 Commits (de7a88e90f4c5427209c2aa7f9223fbdb4ac5fc9)

Author SHA1 Message Date
Aevann 50680e0fa8 cut down on chud award evasion 2023-03-21 23:33:43 +02:00
Aevann 0a12e0c069 fix minor annoyance when uploading files 2023-03-21 20:35:31 +02:00
Aevann 836c6ae29f fix 500 error 2023-03-19 19:31:00 +02:00
Aevann b004617695 customizable chud phrases 2023-03-19 19:13:45 +02:00
Aevann f5a68a7e79 fix 500 errors 2023-03-19 14:01:57 +02:00
Aevann 8d096e1123 put a space before file link too 2023-03-17 19:40:55 +02:00
Aevann 57765f0776 revert sqlalchemy changes 2023-03-16 08:27:58 +02:00
Aevann a392fbb86d restore autoflush 2023-03-16 06:21:57 +02:00
Aevann 3de34c9a65 Merge branch 'keep-session-open' of https://fsdfsd.net/rDrama/rDrama 2023-03-15 08:02:47 +02:00
Aevann f5682dd483 fix video and audio links 2023-03-15 08:00:02 +02:00
Aevann c6a7051200 flush instead of committing inside requests 2023-03-15 07:19:35 +02:00
Aevann f768d81103 keep db sessions open 2023-03-15 05:58:00 +02:00
Aevann 903fb21961 fix images again 2023-03-15 05:07:43 +02:00
Aevann 97608ea0a9 test getting rid of ![]( on devrama 2023-03-12 15:02:31 +02:00
Aevann 571ae603c7 fix this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3770101#context 2023-03-12 11:40:30 +02:00
Aevann 3afecb326b fix videos and image on WPD 2023-03-07 22:33:12 +02:00
Aevann 355af22171 do this https://stupidpol.site/post/152490/downvoting-isnt-funny-its-just-annoying/3729531#context 2023-03-07 02:25:40 +02:00
Aevann a76729cda5 add IGNORE_1WEEk_EDITING_LIMIT perm 2023-03-06 22:22:15 +02:00
Aevann 3e3b81fb00 allow child comments by everyone in ADMIGGERS_THREADS 2023-03-05 18:44:14 +02:00
Aevann 7417a115af combine 2 janny perms 2023-03-05 12:03:21 +02:00
Aevann 8d57a983cd do this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3708981#context 2023-03-04 23:50:19 +02:00
Aevann d7f42ac50a dont give shekels to ppl not notified bc of blocks + dont give shekels to ppl ALSO mentioned directly + prevent group double charging on edit + do this https://stupidpol.site/h/countryclub/post/79285/-/3695711#context 2023-03-02 21:56:43 +02:00
Aevann 308bb03125 add !everyone 2023-03-02 02:32:51 +02:00
Aevann b0075fb393 fix badge thread 2023-03-01 22:57:18 +02:00
Aevann ff73022863 mive /edit_post and /edit_comment to the bottom 2023-03-01 00:22:59 +02:00
Aevann 55c8a51a1d make it possible to position poll options 2023-03-01 00:09:16 +02:00
Aevann 86b0d2f5c1 fix comments not appearing 2023-02-27 18:16:12 +02:00
Aevann 8342e8b7c3 increase the limit from 8 files to 20 files 2023-02-27 18:05:28 +02:00
Aevann 984aecec9a destroy the shadow realm (#135)
Co-authored-by: Aevann <randomname42029@gmail.com>
Reviewed-on: #135
2023-02-27 15:38:12 +00:00
Aevann 5b71b0a81a refactor file upload 2023-02-27 17:02:35 +02:00
Aevann 9559c6e93a hide ghosts in push notifs 2023-02-27 15:35:53 +02:00
Aevann 17bb6dad48 blackjack fix exploit 2023-02-27 07:33:45 +02:00
Aevann 6e200d332e use [file] instead of <file> 2023-02-27 07:24:26 +02:00
Aevann aec0bbc7bd dont give error when body is missing <file> 2023-02-26 14:46:38 +02:00
Aevann 663cdde1f4 increase the limit for concurrent file uploads from 4 to 8 2023-02-26 14:19:30 +02:00
Aevann 6ac9b32834 allow positioning of files 2023-02-26 14:08:37 +02:00
Aevann fe0b8887bc change 1/second ratelimit to 1/2 second 2023-02-26 12:26:26 +02:00
Aevann 82a73392a9 fix errors 2023-02-26 10:49:09 +02:00
Aevann 8c495c914a default ratelimit doesnt apply implicitly if theres other @limiter.limit before the function, so add it explicity before all functions 2023-02-26 10:41:04 +02:00
Aevann 4c35f0b07f remove unnecessary line 2023-02-26 08:35:59 +02:00
Aevann 7aaeedea36 better ratelimiting 2023-02-26 03:42:39 +02:00
Aevann 0bc727a6e1 give me push notifs for direct replies 2023-02-25 20:17:24 +02:00
Aevann fbdad373f2 fix broken push notifs 2023-02-24 05:28:03 +02:00
Aevann 22051152de fix 500 error 2023-02-24 05:00:22 +02:00
Aevann 81561f23ca give push notifs for comments in subscribed threads 2023-02-24 04:50:46 +02:00
Aevann c697d3ea34 change notif title to be clearer 2023-02-24 04:43:26 +02:00
Aevann cb73c7c681 give push notifs to mentions on edit 2023-02-24 04:42:20 +02:00
Aevann 6755cbf28a move an if condition to push_notif() 2023-02-24 03:56:46 +02:00
Aevann 2caf9a9faf remove redundant if condition 2023-02-24 03:47:50 +02:00
Aevann a395c18955 remove unnecessary tabs 2023-02-22 19:27:33 +02:00
Aevann 17488de9d2 remove unused import 2023-02-19 00:35:59 +02:00
Aevann 81cc869fe2 make sure autojanny, zozbot, longpostbot add to the comment count of a post 2023-02-18 23:59:17 +02:00
Aevann d2c2d313a2 show the reply box on deleted posts 2023-02-18 20:10:44 +02:00
Aevann 95938ee3ec make sure all comment links have #context 2023-02-07 04:34:11 +02:00
Aevann 59fe09d0af disable NSFW marking in WPD 2023-02-01 20:52:34 +02:00
Aevann 349fa17836 use exlamation marks instead of dots in responses to users 2023-01-27 13:57:29 +02:00
Aevann f8822ac14d add a ratelimit to media uploads 2023-01-25 17:13:24 +02:00
Aevann c4d3234988 make can_see give 403 error instead of 404 2023-01-25 12:59:45 +02:00
Aevann cdb1b42f72 fix this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3342634#context 2023-01-23 04:14:56 +02:00
Aevann a40dee5bd8 improve user ratelimiting 2023-01-21 06:39:46 +02:00
Aevann 0da34bf23c check for existing snappy quotes 2023-01-21 05:08:05 +02:00
Aevann 1919fc822a give me push notifs for DMs 2023-01-20 05:42:05 +02:00
Aevann 4e24336a66 fix 500 error 2023-01-01 17:44:37 +02:00
Aevann 044664a25e get rid of useless tabs and spaces 2023-01-01 13:36:20 +02:00
Aevann 8ee189022b seething hatred 2022-12-30 21:01:47 +02:00
Aevann c4872ecb07 Revert "attempt to fix ratelimiting user"
This reverts commit 99597fc36c.
2022-12-30 20:43:13 +02:00
Aevann 99597fc36c attempt to fix ratelimiting user 2022-12-30 20:40:58 +02:00
Aevann 9a8c986f93 attempt to fix ratelimiting user 2022-12-30 20:33:07 +02:00
Aevann af60fc3ed7 fix exploit 2022-12-30 20:19:34 +02:00
Aevann 9490f1796c check badge names 2022-12-30 18:28:24 +02:00
Aevann 6927009b3a delete /comments 2022-12-30 09:35:32 +02:00
Aevann 909e3f5f29 use a cool flask feature i didnt know about 2022-12-29 12:39:10 +02:00
Aevann 99ab57dea4 clearer error message when replying to deleted shit 2022-12-27 05:52:41 +02:00
Aevann c4e4a8d853 give jannies push notifs for chat 2022-12-25 22:30:50 +02:00
Aevann 0299a287ed Revert "remove #context in links"
This reverts commit 169dc4ebef.
2022-12-24 21:19:47 +02:00
Aevann a63b02470d use sets with in statements 2022-12-24 00:22:41 +02:00
Aevann1 3ae5292ce4 remove pcm from code 2022-12-21 14:42:41 +02:00
Aevann1 59738f5701 minor push notifs title fix 2022-12-20 05:08:58 +02:00
Aevann1 169dc4ebef remove #context in links 2022-12-20 05:05:13 +02:00
Aevann1 ea322e4c20 remove ?context=8 2022-12-20 05:03:59 +02:00
Aevann1 e08e2ce1c9 fix wall push notif url that JC broke 2022-12-20 05:03:43 +02:00
Aevann1 2028216c45 do this https://stupidpol.site/h/slackernews/post/132440/ml-engineer-analyzes-what-chatgpt-marks/3265102#context 2022-12-19 19:12:07 +02:00
Aevann1 6cde4a040c make ?context=8 default 2022-12-18 16:48:48 +02:00
Aevann1 f54b9a0259 fix 500 error 2022-12-16 19:45:01 +02:00
Snakes 88352cc1cb
Revert "modmail: fix modmail 404 (#64)"
This reverts commit a9309096b4.

This doesn't fix the modmail bug in all contexts and introduces a bug
in another. Root cause is that POST /comments is sometimes called by
DM reply boxes (rather than POST /@<username>/message), revert pending
fix.
2022-12-13 22:07:32 -05:00
justcool393 a9309096b4 modmail: fix modmail 404 (#64)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #64
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-14 02:13:50 +00:00
Aevann1 2b358ddcfc prevent the manlet from deleting his comments 2022-12-12 22:45:11 +02:00
justcool393 ab41db22b7 [DO NOT MERGE] multiple sub banners (#59)
allows multiple sub banners

Snakes note: By request of Carp, especially for WPD.

Co-authored-by: justcool393 <justcool393@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #59
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-11 23:44:34 +00:00
Aevann1 cd9591cd28 make post.new work when viewing comment 2022-12-10 19:06:28 +02:00
Aevann1 ce27be1d4a fix comment refactor bug 2022-12-10 10:26:47 +02:00
Snakes 0d580b8b4f
Fix post comment count logic not activating.
Also standardize parameter list order for comment games.
2022-12-09 00:56:08 -05:00
justcool393 f848f68799 walls: remove duplication among routes/templates (#52)
removes a bunch of duplicated code in commenting and userpages

Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #52
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-09 03:35:28 +00:00
Aevann 81267ef1c6 do this https://stupidpol.site/h/countryclub/post/79285/tired-of-some-cute-twink-jannies/3194721?context=8#context (#53)
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Reviewed-on: #53
2022-12-07 16:51:51 +00:00
Aevann1 4634b45212 fix profile wall push notif titles 2022-12-07 10:48:06 +02:00
Aevann1 2b7f7cef1b fix marking read from push notifs 2022-12-05 16:38:24 +02:00
Aevann1 3971607aee fix agendapostered wall comments 2022-12-05 05:08:06 +02:00
Aevann1 d6a219c151 fix this https://rdrama.net/h/changelog/post/128866/changelog-added-profile-walls-profile-views/3186595?context=8#context 2022-12-05 04:11:13 +02:00
Aevann1 1e34625c1f fix editing wall comments 2022-12-05 04:08:24 +02:00
Aevann1 5070cb4fc0 fix spam check 2022-12-05 03:31:21 +02:00
Snakes d976dcef7e
Update wall_comment for sanitize_poll_options. 2022-12-04 20:05:45 -05:00
Aevann1 cb4d941fd0
add profile wall 2022-12-04 20:05:45 -05:00
justcool393 ed0981cbdb add functionality to disable poll formatting (#35)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #35
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-12-04 21:46:27 +00:00
Aevann e105035272 remove country club system and replace it with a 3 tier thing: (#41)
- /h/masterbaiters: 1 TS - for gayops

- /h/countryclub: 1000 TS - for anything requiring secrecy and doesnt need critical mass - have to make it a rule that u cant post gayops in /h/countryclub

- /h/chudrama: 5000 TS - for chad+stud posts

EDIT: i removed the /h/masterbaiters gate, but u can bring it back if u want
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #41
Co-authored-by: Aevann <aevann@noreply.fsdfsd.net>
Co-committed-by: Aevann <aevann@noreply.fsdfsd.net>
2022-12-04 18:39:06 +00:00
Aevann1 407dcb1282 same as last commit 2022-12-03 07:39:58 +02:00
Aevann1 f28ae7cca1 refresh comment textarea on edit - fixes edge case 2022-12-03 07:27:47 +02:00
Aevann 5c2dab73c7 stop using pusher (#37)
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Co-authored-by: Snakes <duolsm@outlook.com>
Reviewed-on: #37
Co-authored-by: Aevann <aevann@noreply.fsdfsd.net>
Co-committed-by: Aevann <aevann@noreply.fsdfsd.net>
2022-12-02 22:21:18 +00:00
justcool393 0106a4e340 antispam: under siege mode 2022-11-30 11:37:35 -06:00
justcool393 e1f785c370 Merge branch 'docs' into 'master' 2022-11-26 14:40:32 -06:00
justcool393 ae50cc2772 const: rename constants from LIMIT to MINIMUM
the new name is much much clearer
2022-11-26 14:20:44 -06:00
Aevann1 bb153e541d Revert "you posts: constantify truescore requirement"
This reverts commit 1b721126a2.
2022-11-26 22:09:07 +02:00
justcool393 1b721126a2 you posts: constantify truescore requirement 2022-11-26 13:39:31 -06:00
Aevann1 8a80616f84 insanely ghetto solution to long back-and-forth chains in notifs 2022-11-26 07:52:37 +02:00
Aevann1 642d19b861 move ratelimit_user after auth 2022-11-26 01:37:04 +02:00
Aevann1 bf4031c832 remove annoying excalmation sign in notifs 2022-11-26 01:18:24 +02:00
Nekobit 2e1d2cb774 Merge branch 'master' into docs 2022-11-25 22:27:15 +00:00
justcool393 7e403469cd polls: constantify max poll options 2022-11-25 16:12:25 -06:00
Aevann1 e4b521a63f limit polls to 10 options to prevent spam 2022-11-25 23:33:38 +02:00
Nekobit af4411b0d7
Documentation page 2022-11-25 15:36:29 -05:00
justcool393 427d8f643d ratelimiting: use ratelimit_user everywhere 2022-11-21 09:30:27 -06:00
Snakes 2c81db79ef
Fix API for /comment/<cid>, /search/comments. 2022-11-18 15:33:07 -05:00
justcool393 83963470e8
user can_view functions (#460)
* user: move can_see_to user class

* stub out can_see in comments and posts

* make can_see a classmethod so it's usable for loggedoutfriends

* test

* kill me now

* threelargeclassesmating

* dfdfdfdfdfdfd

* sdsdsdsd

* classmethod should be above i think

* Revert "classmethod should be above i think"

This reverts commit df1772eb9e7e71bf7b89123f6277b648de2b1af3.

* Revert "Revert "classmethod should be above i think""

This reverts commit 32883406c2e2916fc6c436611376a1817c16cb84.

* test rewritnig thing

* go home python

* what the fuck python

* fix AttributeError

* sdsdsdsdsdsd

* lazy and user and stuff

* test

* Revert "test"

This reverts commit 45af5bb3d45f3ec17126ab117d494ec978062a38.

* merge

* newline

* test

* test 2

* Revert "test"

This reverts commit 196dae677e2ee8cd29261c93dcb747087cb399b6.

* revert test

* fix merge error

* fix import error ciruclation i think

* sdsd

* add type annotations back

* deleted_utc

* isinstance

* user_can_see in jinja and remove unnecessary things

* a bunch of stuff
remove can_see from comment and post
expand can_see to messages

* antiannoyingamountsofwhitespace

* fix for chudrama

* improve prev
2022-11-17 16:02:08 -05:00
justcool393 3d7737387c use default config vlaue const everywhere 2022-11-15 10:55:00 -06:00
justcool393 9b734a8e3a fix ghost 2022-11-15 08:21:37 -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
justcool393 000b4f4c37 can post in ghost threads 2022-11-14 11:20:34 -06:00
Aevann1 41ab1f313c move feature_required wrappers up 2022-11-14 18:14:47 +02:00
justcool393 84d9ed6655 antispam: sanity check 2022-11-13 21:48:52 -06:00
Snakes cc8f2d1a6e
Restrict permabanned editing content. 2022-11-13 19:00:55 -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 80d7d5281d ratelimit_user() wrapper 2022-11-13 00:07:15 -06:00
Aevann1 3f17624de6 validate poll options body_html length 2022-11-12 12:27:05 +02:00
Aevann1 c066227d2b remove pizza autovote 2022-11-09 23:27:16 +02:00
justcool393 26549a6e66
remove logged out routes (#433)
* remove /logged_out/ routes

* update sitemap, remove users route, and update header

* cloudflare cookie

* only mess with the cookie whenever we desire auth

* sitemap: (small) improvements
sitemap: fix little bug i introduced
sitemap: fix login redirects for /id/ routes

* sitemap: remove duplicate entry

* contact is auth desired

* imports: don't import what we don't need and bind late to the db

* praying to god this works

* keep yourself safe

* oh i actually need to commit and push lol

* import Sub

* t

* refix cache purger
2022-11-09 00:35:24 -05:00
Snakes 5e35342d2e Fix Cloudflare imports identifier shadow.
Proximal reason for fix is that /admin/clear_cloudflare_cache resulted
in infinite recursion and a stack overflow because it tried to call
itself as `clear_cloudflare_cache` rather than hitting the function of
the same name in files.helpers.cloudflare.
2022-11-07 17:30:15 -05:00
justcool393 1a30d6ccad blocks: don't check for blocks on the route midway through creating a post
blocks: short circuit with admin check (can avoid a query in some cases)
2022-11-06 23:24:23 -06:00
Snakes 1eaebd2ea1
Extend special API comment display to bussy-bot. 2022-11-06 19:49:50 -05:00
Aevann1 fbddf3e59c fix snappy gambling 2022-11-07 02:08:50 +02:00
justcool393 cd33fa9046 slots: fix numerous bugs with slots
slots: fix missing imports (x2)
slots: fix other user errors being returned to a potentially completely unrelated user

for example if Snappy was under the rehab effect and it pulled the slot, it'd abort and potentially cause other bugs down the chain, which makes no sense to a user or could leave a post in a wonky state
2022-11-01 18:03:53 -05:00
Aevann1 da5cc4093f make snappy gamble again 2022-11-02 00:40:22 +02:00
Aevann1 88e7f30f04 make !SLOTS work too 2022-10-31 02:20:50 +02:00
justcool393 4ff2a55ed2 fix prev 2022-10-30 15:36:30 -05:00
justcool393 d61eda8427 merge i think 2022-10-30 15:08:20 -05:00
Aevann1 e50e2fcae8 fix prev commit 2022-10-30 20:47:49 +02:00
Aevann1 62d3738e46 rename ADMIGGER variable to ADMIGGER_THREADS for clarity 2022-10-30 20:45:53 +02:00
justcool393 b9f2a7123e actions: move pizzashill autovotes to actions 2022-10-30 01:03:23 -05:00
Aevann1 f09ec0ca17 restore slot gambling in comments 2022-10-30 02:36:23 +02:00
justcool393 35e2128dec
get: use function to get voted and blocked properties (#425)
* get: comments and posts: use get function from get.py
* fix prev commit
* move filter to correct place
* fix error and also log so i can figure out what's wrong
* comments: add some more trace logging
* should_keep_func always acts as return True if None is passed in
* remove logging code
2022-10-28 19:13:37 -05:00
justcool393 8fe73cb68e refactor blackjack a bit 2022-10-20 19:28:05 -05:00
Aevann1 465160dbe6 dont include SITE_FULL in post urls 2022-10-18 13:09:53 +02:00
Snakes 616e15ebb9
Fix posting/commenting from API.
The rework to v.client meant that `is_bot` on Submission and Comment
would attempt to be populated with a ClientAuth object when submitted
by a bot other than Snappy or bbbb. SQLAlchemy requires an actual
boolean, not just a truthy value.
2022-10-15 10:11:14 -04:00
Aevann1 6465982580 decouple v.last_active from the calc_users 2022-10-15 12:08:14 +02:00
justcool393 39aa59a37a add g.is_api_or_xhr so we can use it where we want to give API output
* also use v.client for strict API clients
2022-10-15 02:11:36 -07:00
justcool393 c56e45aa57 create cloudflare helper 2022-10-13 00:55:15 -07:00
justcool393 ee85b5577a use error handlers in cases where we can 2022-10-12 08:55:42 -07:00
justcool393 7b3361cfb7 temporary (maybe) sidebar and banner processing fn
* also make existing badge return 409 instead of 403
2022-10-12 03:04:34 -07:00
Aevann1 925ec12141 more shadowban refactor 2022-10-12 08:53:32 +02:00
justcool393 501fbbf5d3 move antispam code to actions 2022-10-11 22:34:55 -07:00
Aevann1 466867afd1 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-10-11 18:41:12 +02:00
Aevann1 e3a3cbd358 add "hot" comment sorting 2022-10-11 18:41:09 +02:00
justcool393 c0acb1722b abort a bunch of stuff where we manually returned JSON 2022-10-11 08:40:19 -07:00
justcool393 456dd43bba replace "if not FEATURES" with wrapper 2022-10-11 00:33:23 -07:00
justcool393 75e593da00 Revert "feature required wrapper"
This reverts commit 8700bcc5ee.
2022-10-10 02:54:47 -07:00
justcool393 f872f734ec constantify a bunch of things
* sign up follow id is now a thing (if not specified will just msg carp instead)
* notification thread id is also a constant now
* blackjackbtz id is a constant, used for i think special PM handling
2022-10-09 23:37:42 -07:00
justcool393 8700bcc5ee feature required wrapper 2022-10-09 23:16:05 -07:00
justcool393 d6f4e20f7d use constant for BBBB_ID instead of 12125 2022-10-09 07:03:21 -07:00
justcool393 56e800fd9d move basedbot to actions as well 2022-10-09 06:49:08 -07:00
justcool393 63c7fe0c29 move zozbot and longpostbot into the actions helpers 2022-10-09 06:28:18 -07:00
justcool393 87fd8ee57a comment sanity checks and constantization
* make HTML body length a constant and use it
* abort before uploads and other tasks if comment level is too deep
* what a nightmare of two functions, please do better next time
2022-10-09 05:54:46 -07:00
justcool393 c9ab2c515b remove some more vestiges
get_post and get_comment both handle this
2022-10-09 01:25:21 -07:00
justcool393 8ea52ba95c constantify comment body length limit and transfer limit 2022-10-09 00:20:28 -07:00
Snakes 556b3e3c4e
PCM: don't rescale uploaded banners. 2022-10-07 21:16:56 -04:00
justcool393 0627a12bc5 don't let users comment on things they can't see 2022-10-07 03:22:07 -07:00
justcool393 e372158729
Merge branch 'frost' into permissions-refactor 2022-10-06 19:05:42 -07:00
justcool393 e93e2d9ca9 convert some more >s to >=s 2022-10-06 01:40:21 -07:00
Aevann1 96f4f8499f fix 500 errors 2022-10-06 09:30:38 +02:00
justcool393 06f88e8a4a post based permissions mostly 2022-10-05 21:45:54 -07:00
justcool393 2fc3044d5b shadowban perms and stuff 2022-10-05 19:24:37 -07:00
justcool393 d5a48871f8 user ban and also fix global hole mod a bit i hope i didn't screw up the templates 2022-10-05 18:58:43 -07:00
justcool393 04f24cd8fd content moderation permission level
holy crap there's a lot
2022-10-05 17:57:08 -07:00
Aevann1 2f979b859b generate modlogs when a hole janny toggles nsfw 2022-10-06 01:24:54 +02:00
justcool393 0a82ca0c30
don't reply to deleted posts/comments 2022-10-04 17:18:19 -07:00
Aevann1 3bf62c6ff0 add missing ban_reason when shadowbanning 2022-10-02 13:31:02 +02:00
Aevann1 da4ade067d make pizza's vote on himself be the first 2022-10-02 12:35:04 +02:00
Aevann1 09cc43060d
add hole mod logs (#380) 2022-09-29 11:39:37 +02:00
Snakes 77ed5728c4
Restore mistakenly removed commenting logic. 2022-09-26 22:44:06 -04:00
Aevann1 cc85cab01d make badges 300px instead 2022-09-27 02:48:03 +02:00
Aevann1 05079a40f4 limit banners to 1MB 2022-09-26 03:41:03 +02:00
Aevann1 4c26a7cd02 limit sidebar and badge images to 1MB 2022-09-26 03:27:31 +02:00
Aevann1 8fcc91a43e reduce resize values 2022-09-26 03:15:36 +02:00
Aevann1 c12f7a5f9a commit before rendering 2022-09-22 22:20:29 +02:00
Aevann1 85b72109a3 increase badge width from 200px to 400px 2022-09-20 20:05:36 +02:00
Aevann1 7d39cdb520 minor auth_desired refactor 2022-09-20 02:51:01 +02:00
Aevann1 2fb4ebdcb0 minor sanitize refactor 2022-09-16 18:30:34 +02:00
Aevann1 7ef876635b fix marsey count 2022-09-14 14:47:16 +02:00
Aevann1 5587b415dc fix kofi webhook 2022-09-14 10:01:25 +02:00
Aevann1 4abf75edc0 add error codes 2022-09-12 11:52:07 +02:00
Aevann1 b0057483c8 link the admigger upload threads in the admin panel for easier access 2022-09-11 09:11:10 +02:00
Aevann1 ae90eb1cf2 simplify house checking logic 2022-09-11 03:53:16 +02:00
outruncolors d57a569125
[DO NOT MERGE] Casino changes (#350)
* Merge up

* Create composable template for casino games

* Big changerinos

* Only allow double down sometimes

* Add drawing capability

* Make everything pretty

* Add leaderboard

* Update files/routes/casino.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/casino.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/twentyone.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/twentyone.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Update files/helpers/twentyone.py

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>

* Add some stuff

* Rehab screen

* Default sets for no games

* Stupid revert

Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>
2022-09-10 16:01:34 -05:00