forked from MarseyWorld/MarseyWorld
Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost
commit
2a638f71c3
|
@ -379,6 +379,7 @@ if SITE == 'rdrama.net':
|
||||||
elif SITE == 'pcmemes.net':
|
elif SITE == 'pcmemes.net':
|
||||||
PIN_LIMIT = 10
|
PIN_LIMIT = 10
|
||||||
FEATURES['REPOST_DETECTION'] = False
|
FEATURES['REPOST_DETECTION'] = False
|
||||||
|
FEATURES['GAMBLING'] = False
|
||||||
POST_RATE_LIMIT = '1/second;4/minute;20/hour;100/day'
|
POST_RATE_LIMIT = '1/second;4/minute;20/hour;100/day'
|
||||||
|
|
||||||
HOLE_COST = 2000
|
HOLE_COST = 2000
|
||||||
|
@ -397,6 +398,7 @@ elif SITE == 'pcmemes.net':
|
||||||
|
|
||||||
WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)"
|
WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)"
|
||||||
|
|
||||||
|
CASINO_ENABLED = False
|
||||||
LOTTERY_TICKET_COST = 12
|
LOTTERY_TICKET_COST = 12
|
||||||
LOTTERY_SINK_RATE = -8
|
LOTTERY_SINK_RATE = -8
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,9 @@ def cron(every_5m, every_1h, every_1d, every_1mo):
|
||||||
g.db = db_session()
|
g.db = db_session()
|
||||||
|
|
||||||
if every_5m:
|
if every_5m:
|
||||||
lottery.check_if_end_lottery_task()
|
if FEATURES['GAMBLING']:
|
||||||
spin_roulette_wheel()
|
lottery.check_if_end_lottery_task()
|
||||||
|
spin_roulette_wheel()
|
||||||
offsitementions.offsite_mentions_task()
|
offsitementions.offsite_mentions_task()
|
||||||
if SITE == 'pcmemes.net':
|
if SITE == 'pcmemes.net':
|
||||||
route_static.live_cached()
|
route_static.live_cached()
|
||||||
|
|
|
@ -15,7 +15,9 @@ from files.helpers.lottery import *
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def casino(v):
|
def casino(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return render_template("casino/rehab.html", v=v)
|
return render_template("casino/rehab.html", v=v)
|
||||||
|
|
||||||
return render_template("casino.html", v=v)
|
return render_template("casino.html", v=v)
|
||||||
|
@ -25,9 +27,11 @@ def casino(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def casino_game_page(v, game):
|
def casino_game_page(v, game):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return render_template("casino/rehab.html", v=v)
|
return render_template("casino/rehab.html", v=v)
|
||||||
if game not in CASINO_GAME_KINDS:
|
elif game not in CASINO_GAME_KINDS:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
feed = json.dumps(get_game_feed(game))
|
feed = json.dumps(get_game_feed(game))
|
||||||
|
@ -52,9 +56,11 @@ def casino_game_page(v, game):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def casino_game_feed(v, game):
|
def casino_game_feed(v, game):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
if game not in CASINO_GAME_KINDS:
|
elif game not in CASINO_GAME_KINDS:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
feed = get_game_feed(game)
|
feed = get_game_feed(game)
|
||||||
|
@ -66,7 +72,9 @@ def casino_game_feed(v, game):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def lottershe(v):
|
def lottershe(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return render_template("casino/rehab.html", v=v)
|
return render_template("casino/rehab.html", v=v)
|
||||||
|
|
||||||
participants = get_users_participating_in_lottery()
|
participants = get_users_participating_in_lottery()
|
||||||
|
@ -77,7 +85,9 @@ def lottershe(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def pull_slots(v):
|
def pull_slots(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -106,7 +116,9 @@ def pull_slots(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def blackjack_deal_to_player(v):
|
def blackjack_deal_to_player(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -125,7 +137,9 @@ def blackjack_deal_to_player(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def blackjack_player_hit(v):
|
def blackjack_player_hit(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -140,7 +154,9 @@ def blackjack_player_hit(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def blackjack_player_stay(v):
|
def blackjack_player_stay(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -155,7 +171,9 @@ def blackjack_player_stay(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def blackjack_player_doubled_down(v):
|
def blackjack_player_doubled_down(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -170,7 +188,9 @@ def blackjack_player_doubled_down(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def blackjack_player_bought_insurance(v):
|
def blackjack_player_bought_insurance(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -185,7 +205,9 @@ def blackjack_player_bought_insurance(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def roulette_get_bets(v):
|
def roulette_get_bets(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
bets = get_roulette_bets()
|
bets = get_roulette_bets()
|
||||||
|
@ -197,7 +219,9 @@ def roulette_get_bets(v):
|
||||||
@limiter.limit("100/minute;2000/hour;12000/day")
|
@limiter.limit("100/minute;2000/hour;12000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def roulette_player_placed_bet(v):
|
def roulette_player_placed_bet(v):
|
||||||
if v.rehab:
|
if not FEATURES['GAMBLING']:
|
||||||
|
abort(404)
|
||||||
|
elif v.rehab:
|
||||||
return {"error": "You are under Rehab award effect!"}, 400
|
return {"error": "You are under Rehab award effect!"}, 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
|
|
||||||
<a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a>
|
<a class="mobile-nav-icon d-md-none" href="/random_user"><i class="fas fa-music align-middle text-gray-500 black"></i></a>
|
||||||
|
|
||||||
{% if v and CASINO_ENABLED %}
|
{% if v and CASINO_ENABLED and FEATURES['GAMBLING'] %}
|
||||||
<a class="mobile-nav-icon d-md-none" href="/casino">
|
<a class="mobile-nav-icon d-md-none" href="/casino">
|
||||||
<i class="fas fa-cards align-middle text-gray-500 black"></i>
|
<i class="fas fa-cards align-middle text-gray-500 black"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
<a class="nav-link" href="/leaderboard" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Leaderboard"><i class="fas fa-trophy"></i></a>
|
<a class="nav-link" href="/leaderboard" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Leaderboard"><i class="fas fa-trophy"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% if CASINO_ENABLED %}
|
{% if CASINO_ENABLED and FEATURES['GAMBLING'] %}
|
||||||
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
<li class="nav-item d-flex align-items-center justify-content-center text-center mx-1">
|
||||||
<a class="nav-link" href="/casino" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Casino"><i class="fas fa-cards"></i></a>
|
<a class="nav-link" href="/casino" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Casino"><i class="fas fa-cards"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -295,6 +295,7 @@ INSERT INTO public.hat_defs VALUES (787, 'Turban', 'Turban with Bindi Dot (Namas
|
||||||
INSERT INTO public.hat_defs VALUES (788, 'LGBTUSSR Officer Hat', 'Rule with an iron fist... And use that iron fist for more than ruling ;)', 2, 1000, NULL, 1664994148);
|
INSERT INTO public.hat_defs VALUES (788, 'LGBTUSSR Officer Hat', 'Rule with an iron fist... And use that iron fist for more than ruling ;)', 2, 1000, NULL, 1664994148);
|
||||||
INSERT INTO public.hat_defs VALUES (808, 'The Capy 2', 'The drippiest and pimpiest capybara out there.', 2, 500, NULL, 1665104484);
|
INSERT INTO public.hat_defs VALUES (808, 'The Capy 2', 'The drippiest and pimpiest capybara out there.', 2, 500, NULL, 1665104484);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO public.hat_defs VALUES (676, 'Kepi', 'Army cap for those unlucky enough to be French', 2, 500, NULL, 1663303083);
|
INSERT INTO public.hat_defs VALUES (676, 'Kepi', 'Army cap for those unlucky enough to be French', 2, 500, NULL, 1663303083);
|
||||||
INSERT INTO public.hat_defs VALUES (678, 'Turkroach', 'Come on Carp this one''s hilarious. It''s semi transparent to clarify', 2, 500, NULL, 1663305640);
|
INSERT INTO public.hat_defs VALUES (678, 'Turkroach', 'Come on Carp this one''s hilarious. It''s semi transparent to clarify', 2, 500, NULL, 1663305640);
|
||||||
INSERT INTO public.hat_defs VALUES (679, 'Judge Dredd', 'THIS USER IS THE LAW', 2, 500, NULL, 1663309533);
|
INSERT INTO public.hat_defs VALUES (679, 'Judge Dredd', 'THIS USER IS THE LAW', 2, 500, NULL, 1663309533);
|
||||||
|
@ -335,6 +336,7 @@ INSERT INTO public.hat_defs VALUES (9, 'Dreads', 'Finally, an excuse for poor hy
|
||||||
INSERT INTO public.hat_defs VALUES (10, 'The XXXTentacion', 'Pay homage to your favorite dead criminal!', 2, 500, NULL, 1662167687);
|
INSERT INTO public.hat_defs VALUES (10, 'The XXXTentacion', 'Pay homage to your favorite dead criminal!', 2, 500, NULL, 1662167687);
|
||||||
INSERT INTO public.hat_defs VALUES (12, 'The Elvis', 'Remember when this dude nailed a 13-year-old?', 2, 500, NULL, 1662167687);
|
INSERT INTO public.hat_defs VALUES (12, 'The Elvis', 'Remember when this dude nailed a 13-year-old?', 2, 500, NULL, 1662167687);
|
||||||
INSERT INTO public.hat_defs VALUES (13, 'Gussy Hat', 'Let everyone know that you''re NOT a rapist. Honest.', 2, 500, NULL, 1662167687);
|
INSERT INTO public.hat_defs VALUES (13, 'Gussy Hat', 'Let everyone know that you''re NOT a rapist. Honest.', 2, 500, NULL, 1662167687);
|
||||||
|
|
||||||
INSERT INTO public.hat_defs VALUES (14, 'Riveter', 'Can you do it? Really?', 2, 500, NULL, 1662167687);
|
INSERT INTO public.hat_defs VALUES (14, 'Riveter', 'Can you do it? Really?', 2, 500, NULL, 1662167687);
|
||||||
INSERT INTO public.hat_defs VALUES (15, 'Top Hat (leprechaun)', 'LLM but Irish', 2, 500, NULL, 1662167687);
|
INSERT INTO public.hat_defs VALUES (15, 'Top Hat (leprechaun)', 'LLM but Irish', 2, 500, NULL, 1662167687);
|
||||||
INSERT INTO public.hat_defs VALUES (16, 'Drinky Beer Hat', 'I actually didn''t know these were real things until I made this', 2, 500, NULL, 1662167687);
|
INSERT INTO public.hat_defs VALUES (16, 'Drinky Beer Hat', 'I actually didn''t know these were real things until I made this', 2, 500, NULL, 1662167687);
|
||||||
|
@ -940,7 +942,7 @@ INSERT INTO public.hat_defs VALUES (504, 'Iron Crown of Lombardy', 'This isn''t
|
||||||
-- Name: hat_defs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
-- Name: hat_defs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
SELECT pg_catalog.setval('public.hat_defs_id_seq', 810, true);
|
SELECT pg_catalog.setval('public.hat_defs_id_seq', 812, true);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue