Commit Graph

700 Commits (0f6b36f40b24bf4a32fba75cee230c429b418557)

Author SHA1 Message Date
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 52f5b2a347 serve almost all files from nginx 2022-12-10 14:21:52 +02:00
Snakes 39a0832223
Sort banned, chudded, etc listings by activity.
The listings of users affected by jannied states are long. To make
them more useful, sort by recent user activity (when v is allowed to
view last_active) to know which accounts are still in use.
2022-12-09 23:47:31 -05:00
Aevann1 c01d757dc7 delete legacy route 2022-12-03 00:37:31 +02:00
justcool393 0106a4e340 antispam: under siege mode 2022-11-30 11:37:35 -06:00
Aevann1 de8a45412b fix /icon.webp 2022-11-30 01:56:11 +02:00
Aevann 9893ede920 fix browserconfig.xml (#30)
Co-authored-by: Aevann1 <randomname42029@gmail.com>
Reviewed-on: #30
2022-11-29 23:19:03 +00:00
Aevann1 bf1da34dae Revert "marseys table is way way too large to use javascript for sorting, you would've known that if u had tested"
This reverts commit fe0da05415.
2022-11-29 05:22:59 +02:00
Snakes 2304876348
Fix emoji search after Marsey caching revert. 2022-11-28 22:18:16 -05:00
Aevann1 261abe3161 archives - add additional route for ease of use 2022-11-29 05:08:26 +02:00
Aevann1 8182be4730 minor syntax change for no reason 2022-11-29 03:53:30 +02:00
Aevann1 c0d91c9e71 fix last commit (i cant do this without coffee help me) 2022-11-29 01:48:16 +02:00
Aevann1 b6c45c4208 make going to the reddit version of archived posts easier 2022-11-29 01:45:52 +02:00
Aevann1 f15350b2a8 fix subreddit links in archives 2022-11-29 00:12:39 +02:00
Aevann1 fe0da05415 marseys table is way way too large to use javascript for sorting, you would've known that if u had tested 2022-11-28 06:59:35 +02:00
Aevann1 d0047dcc5a include users who have more than 30 days to be unbanned/unchhuded in /banned and /chuds for accountability 2022-11-28 03:32:01 +02:00
justcool393 5a1224ddc7 fix shadowbanned and nonexistent users in marseys table 2022-11-27 11:13:23 -06:00
justcool393 767cc467bb marseys: cache marseys and emojis and fun stuff (#15)
Co-authored-by: justcool393 <justcool393@gmail.com>
Reviewed-on: #15
Co-authored-by: justcool393 <justcool393@noreply.fsdfsd.net>
Co-committed-by: justcool393 <justcool393@noreply.fsdfsd.net>
2022-11-27 16:59:36 +00:00
Aevann1 155a5b40c9 excise niggabit's solution for now 2022-11-26 23:04:42 +02:00
justcool393 0ff034b01b add typing to a bunch of routes 2022-11-26 15:00:16 -06:00
justcool393 19b73f8e7e api: fix some missing imports 2022-11-26 14:46:49 -06:00
justcool393 35b1532bb4 admin: remove meme admin vestige 2022-11-25 19:15:39 -06:00
Aevann1 642d19b861 move ratelimit_user after auth 2022-11-26 01:37:04 +02:00
Aevann1 2938f930fd make me not see modmail, if its important the other jannies will tell me 2022-11-25 22:56:11 +02:00
justcool393 427d8f643d ratelimiting: use ratelimit_user everywhere 2022-11-21 09:30:27 -06:00
Aevann1 5288d7a7dc remove android app and replace with instructions on how to install PWA 2022-11-20 00:04:08 +02:00
justcool393 255d5b2453 security: fix mute bypass
modmail: constantify user ID
2022-11-17 16:50:06 -06:00
justcool393 caf3a81748 remove unnecessary fstrings
(or actually use the feature)
2022-11-17 10:01:03 -06:00
justcool393 4b9c702877 fix listing bugs 2022-11-15 03:28:39 -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 c9ecb5d535
account linking improvements (#448)
currently account delinking is very messy and can sometimes just not work
we do codey stuff so it's not as bad
also we create a pretty page for mops to mop up borked account links

* alts: allow proper delinking

* fix prev commit

* url fix

* fix 500

* fixes

* :pepodrool:

* flag

* :pepodrool: redux

* sdsdsdsds

* correct endpoint

* fix html page

* alts: only adjust session history if flag is set

* fix 500

* allow relinking

* fsdsds

* :pepodrool: redux

* alts: don't fail if an alt isn't history

* use postToastSwitch + some API changes

* remove unnecessary variables

* d-none

* delink accounts mod action

* fa-link-slash

* alts: add form to create alt

* remove copied and pasted template

* rounded section

* UI improvement + fix

* \n

* fix status

* admin: remove duplicate route
admin: do a permissions check on 2 pages that need it
admin: set the manual flag for manually flagged alts

* variable change

* fix 500

* alts

* add shadowban icon to alt link tool

* shadowbanned tooltip

* add user info section

* fix 500, remove unnecessary form, and add alt votes button

* trans and also link to page

* margin

* sdsdsd

* stop the count

* fix prev commit

* with ctx

* plural

* alts

* don't show shadowbanned users to those who can't see them
this is... extremely rare and won't ever be seen in production however if perms were ever rearranged in the future, this keeps permissions correct

* shadowban check in alt list

* let shadow realm enthusiasts see shadowban alts

* sdsdsds

* test

* be graceful where needed

* sdsdsdsds

* alts: don't allow adding the same account
alts: clarify wording

* rename and reorder on admin panel

* EOL

* remove frankly unnecessary check

* try with a set

* test

* Revert "try with a set"

This reverts commit 72be353fba5ffa39b37590cc5d3bf584c94ee06e.

* Revert "Revert "try with a set""

This reverts commit 81e41890a192e8b46d0463477998e905fddf56ba.

* Revert "Revert "Revert "try with a set"""

This reverts commit be51592135a3c09848f993f0154bd2ac862ae505.

* clean up test
2022-11-14 12:32:13 -05: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 b5b8b2927c
Expand blackjack handling pipeline. 2022-11-13 21:43:26 -05:00
justcool393 f6842a13e4 links 2022-11-12 20:58:28 -06:00
justcool393 538497eb55 antispam: hook up duplicate checker 2022-11-12 20:48:33 -06:00
Snakes 5ce62245b1
Adjust modmail anti-spam. 2022-11-12 21:37:33 -05:00
Aevann1 05b7e79b76 remove the code i added for rdrama.com 2022-11-11 15:52:18 +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
justcool393 0fffa7efc0 rename truecoins to truescore 2022-11-06 23:04:34 -08:00
justcool393 511ed26574 settings: add new settings pages to API
settings: remove old settings pages from API
settings: delete unused settings template
2022-11-06 20:06:37 -08:00
justcool393 6e0fd23ba3 settings: rework settings frontend 2022-11-06 20:06:37 -08:00
Aevann1 d76fe63c7f constantify image extensions and fix imgur .gif bug 2022-11-05 23:01:23 +02:00
justcool393 7c385c222f fix previous commit 2022-11-04 18:51:42 -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
justcool393 89d5428f77 bans: don't leak shadowbans to people who can't see them 2022-11-01 15:59:18 -05:00
Aevann1 aec5f96a7b changes to donation flow 2022-10-30 20:43:06 +02:00
Aevann1 23883c530b constantify TRUESCORE_DONATE_LIMIT 2022-10-30 16:18:42 +02:00
Aevann1 cb8706ec6b small fix to /live 2022-10-30 01:33:23 +02:00
Aevann1 9335dfd92a small fix to /live 2022-10-30 01:29:24 +02:00
Aevann1 3bc248fe07 fix small bug in /live 2022-10-30 00:19:01 +02:00
Aevann1 f687d0e1ee convert /live code from greek to englsh 2022-10-30 00:10:35 +02:00
justcool393 3a6dfdf2de listings: constantify PAGE_SIZE as 25
magic numbers are bad, do better next time
2022-10-28 22:20:48 -05:00
Aevann1 0339016567 fix /live 2022-10-29 04:20:23 +02:00
Snakes 6a021c4736
PCM /live: scraping scheduled streams revision. 2022-10-26 17:03:21 -04:00
Snakes 895f0c9714
PCM /live: improve scraping robustness. 2022-10-26 16:14:16 -04:00
Aevann1 b9d7b4e027 sneed 2022-10-26 16:33:50 +02:00
Aevann1 44fca7f086 ripbozo 2022-10-17 21:13:33 +02:00
Aevann1 bf859b0e3a sneed 2022-10-17 18:58:15 +02:00
justcool393 cc0c767877 static data as one function which is referenced 2022-10-17 05:08:09 -05:00
justcool393 f4af073253 fix 17 potential 500s 2022-10-16 02:51:42 -07: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 ee85b5577a use error handlers in cases where we can 2022-10-12 08:55:42 -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 8700bcc5ee feature required wrapper 2022-10-09 23:16:05 -07:00
Aevann1 356c9f1219 add "(Admin)" to messages sent to users due to admin actions (for clarity to new users) 2022-10-10 08:11:17 +02:00
Snakes f7a52ddb8c
PCM live: stop infinite recursion on invalid input. 2022-10-07 22:32:33 -04:00
Aevann1 cfd4b6399f use mailgun again 2022-10-08 02:44:02 +02:00
justcool393 e372158729
Merge branch 'frost' into permissions-refactor 2022-10-06 19:05:42 -07:00
Aevann1 4ed67a6bef same ast last commit 2022-10-07 00:50:36 +02:00
Aevann1 c20b0c795b put the "??? ago" streamers last 2022-10-07 00:49:43 +02:00
Aevann1 fbd815f54e fix this https://rdrama.org/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/2847925?context=8#context 2022-10-06 08:26:10 +02:00
justcool393 039fa606d6 streamer permissions 2022-10-05 23:22:42 -07:00
justcool393 6401f9e9c2 shadowban log 2022-10-05 22:56:19 -07:00
justcool393 047013f92b patron perm and also move them around 2022-10-05 22:48:55 -07:00
justcool393 dc5a132583 mop visibility, WPD notifications, and a fix with shadowbans 2022-10-05 22:25:45 -07:00
justcool393 38f3c7ed55 view sorted admin list and message blocked users 2022-10-05 22:16:09 -07:00
justcool393 68851ed986 profile views and modmail/hole creation notifications 2022-10-05 22:07:38 -07:00
justcool393 2fc3044d5b shadowban perms and stuff 2022-10-05 19:24:37 -07:00
Aevann1 67d6d7e2de [PCM] allow all jannies to add streamers 2022-10-06 00:20:09 +02:00
Aevann1 08d6a9c901 Revert "add nginx to docker"
This reverts commit 7c1eb4c6e3.
2022-10-04 21:35:02 +02:00
Aevann1 7c1eb4c6e3 add nginx to docker 2022-10-04 03:06:57 +02:00
Snakes e05b1197c6
Identify benefactors in listing. 2022-10-02 15:37:22 -04:00
Snakes 81dda4f6cc
Serve static user content with nginx. 2022-10-02 14:27:18 -04:00
justcool393 b79a89560f
add requested kind to set if not present
fixes issue where the kind wouldn't show up on the list and cause a error in template rendering
2022-10-02 00:50:59 -07:00
Snakes cd0b564401
Add 'added' column to /marseys. 2022-10-01 18:27:51 -04:00
Aevann1 a7acbe9831 show our email to loggedout visitors in /contact 2022-10-01 12:14:46 +02:00
Aevann1 7e7c14fe22 fix bug in /live 2022-10-01 11:43:16 +02:00
justcool393 fc623b7201 get id fix for sbs 2022-09-30 22:16:15 -07:00
justcool393 f9d6976202
include shadowbanned users here 2022-09-30 22:08:18 -07:00
Aevann1 d9a57cf201 debug /live 2022-10-01 01:38:07 +02:00
Aevann1 08fc034973 Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost 2022-09-30 23:07:56 +02:00
Aevann1 30d4f5e902 allow carp and snakes to see /patrons 2022-09-30 23:07:53 +02:00
justcool393 7e3f43c9ab
unperson shadowbanned users (#373)
* unperson shadowbanned users
if a shadowbanned user copes, does anyone hear them seethe?

* unperson shadowbanned users (by id)

* don't import that

* Add include_blocks.
We don't always want to request blocks from the db when we have a user set

* block shadowbanned users from hole mod tools

* don't allow awarding shadowbanned things

* fix conflict

* gracefully use get_account when specified and also add include_blocks flag to get_account as well
2022-09-30 14:00:58 -07:00
Aevann1 4a1865742a fix bad code in /live 2022-09-30 14:19:48 +02:00
Aevann1 7b7092b5f5 better syntax in /live 2022-09-29 20:29:44 +02:00
Aevann1 5b1e873e54 fix /live 2022-09-29 20:25:01 +02:00
Aevann1 2f16510183 specify which error it was in process_streamer() 2022-09-29 08:08:40 +02:00
Snakes f05ec93b95
Add gambling wager badge logic.
This commit touches more files than it ought to because this change
required untangling some circular imports, notably a lingering import
of files.helpers.slots in helpers.actions (presumably from old Snappy
gambling logic) and the User.active_blackjack_game accessor. Otherwise,
the logic is fairly straightforward.
2022-09-29 00:26:50 -04:00
justcool393 6c8faf6de7
add API version of stats page (#378)
statsmaxxing
2022-09-28 10:14:40 +02:00
Snakes 528d26b094
Fix /marseys missing listdir import.
Apparently the /marseys route was getting its listdir from one of
the `from os import listdir` removed in fa4dee419d. static.py
already has an import os, so we just use the fully qualified
os.listdir.
2022-09-26 21:44:34 -04:00
Aevann1 e474a5f42d go from dutch to greek in /live 2022-09-26 07:08:29 +02:00
Aevann1 37e1f25624 make using proxies only happen in 3 circumstances again 2022-09-26 06:01:25 +02:00
Aevann1 fea1f276d9 log /live errors 2022-09-26 04:46:56 +02:00
Aevann1 3339baee54 fixing /live 2022-09-25 13:28:53 +02:00
Aevann1 5a97a6f6e6 allow pcm /live to enter channel link 2022-09-25 08:45:19 +02:00
Aevann1 8a85c2413c add consent 2022-09-25 08:31:46 +02:00
Aevann1 a28a4664c2 huh? 2022-09-25 08:30:49 +02:00
Aevann1 9d9783fe0e fix 2022-09-25 08:27:58 +02:00
Aevann1 10d09f076c fix 2022-09-25 08:18:03 +02:00
Aevann1 c79067f7f1 make it possible to add channels by name 2022-09-25 08:14:21 +02:00
Aevann1 8d6937e237 add obese 2022-09-25 07:46:02 +02:00
Aevann1 13a3d5c27e fix 2022-09-25 07:45:02 +02:00
Aevann1 f8fccd34db allow me to add channels 2022-09-25 07:43:44 +02:00
Aevann1 4ebd8fb552 limit adding channels to kip 2022-09-25 07:42:29 +02:00
Aevann1 92bdd67884 debug 2022-09-25 07:31:55 +02:00
Aevann1 fc2758df50 fix 2022-09-25 07:24:59 +02:00
Aevann1 63a7183f7e fix /live regex 2022-09-25 06:53:53 +02:00
Aevann1 2b0a798fec fix 2022-09-25 06:40:19 +02:00
Aevann1 5d30c3a632 fix 2022-09-25 06:38:43 +02:00
Aevann1 78f0721bb0 fix 2022-09-25 06:37:16 +02:00
Aevann1 695fca5d35 fix 2022-09-25 06:35:56 +02:00
Aevann1 015074c4ca the fuck 2022-09-25 06:33:55 +02:00
Aevann1 97b2e09b65 fix 2022-09-25 06:31:59 +02:00
Aevann1 351a7ca17b fix 2022-09-25 06:27:28 +02:00
Aevann1 230b71c19b same as last commit 2022-09-25 06:22:33 +02:00
Aevann1 4212cfa0b2 testing on pcm 2022-09-25 06:11:06 +02:00
Aevann1 ea7803ef44 testing 2022-09-25 05:43:57 +02:00
Aevann1 9ebea2c6e9 fix 2022-09-25 05:36:54 +02:00
Aevann1 a83821ebdb testin on devrama 2022-09-25 05:36:11 +02:00
Aevann1 8ce942dcc0 testing on devrama 2022-09-25 05:34:28 +02:00
Aevann1 8319aefe1c get it ready for pcm 2022-09-25 05:29:38 +02:00
Aevann1 c2a189012b redirect instead of rendering 2022-09-25 05:21:41 +02:00
Aevann1 962cf66bcd flush printed shit 2022-09-25 05:17:15 +02:00
Aevann1 ae3b81bb82 fix 2022-09-25 05:11:18 +02:00
Aevann1 f4b41f0049 make addition and removal of channels happen instantly (testing in devrama) 2022-09-25 05:08:44 +02:00
Aevann1 677a31f80d strip input [/live] 2022-09-24 02:21:32 +02:00
Aevann1 b32a399925 fix 2022-09-24 02:11:40 +02:00
Aevann1 b0d1b1f157 fix /live ordering 2022-09-23 23:09:19 +02:00
Aevann1 84f4256c81 fix last commit 2022-09-23 23:01:38 +02:00
Aevann1 1b3fa8a63e same as last commit 2022-09-23 22:59:45 +02:00
Aevann1 a63d4940ae fix PCM /live list 2022-09-23 22:58:10 +02:00
Snakes 1cf5ec9e0d Revert "PCM: update live list in background."
This reverts commit 3acdb44a98.
2022-09-23 15:41:04 -04:00
Snakes 3acdb44a98
PCM: update live list in background. 2022-09-22 19:39:26 -04:00
Aevann1 495cc60a26 fix /live 2022-09-23 00:27:38 +02:00
Aevann1 ada5ab61a6 validate inputted channel id 2022-09-23 00:02:15 +02:00
Aevann1 2ef91698f4
allow PCM chadmins to add or remove channels (#365)
* testing on devrama

* fix for devrama

* fix

* fix

* fix

* fix

* fix

* fix

* test

* fix

* test

* test

* commit
2022-09-22 23:40:32 +02:00
Aevann1 5c7ff17512 remove "/live" from url for offline streamesr 2022-09-22 20:26:06 +02:00