forked from rDrama/rDrama
sfd
parent
f0af3241bc
commit
f1458c091f
|
@ -220,19 +220,19 @@ def remove_mod(v, sub):
|
||||||
|
|
||||||
return redirect(f'/h/{sub}/mods')
|
return redirect(f'/h/{sub}/mods')
|
||||||
|
|
||||||
@app.get("/create_sub")
|
# @app.get("/create_sub")
|
||||||
@is_not_permabanned
|
# @is_not_permabanned
|
||||||
def create_sub(v):
|
# def create_sub(v):
|
||||||
if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403)
|
# if SITE_NAME == 'rDrama' and v.admin_level < 3: abort(403)
|
||||||
|
|
||||||
if request.host == 'rdrama.net': cost = 0
|
# if request.host == 'rdrama.net': cost = 0
|
||||||
else:
|
# else:
|
||||||
num = v.subs_created + 1
|
# num = v.subs_created + 1
|
||||||
for a in v.alts:
|
# for a in v.alts:
|
||||||
num += a.subs_created
|
# num += a.subs_created
|
||||||
cost = num * 100
|
# cost = num * 100
|
||||||
|
|
||||||
return render_template("sub/create_sub.html", v=v, cost=cost)
|
# return render_template("sub/create_sub.html", v=v, cost=cost)
|
||||||
|
|
||||||
|
|
||||||
@app.post("/create_sub")
|
@app.post("/create_sub")
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
|
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
|
<a class="btn btn-primary btn-block mb-3 disabled" href="/create_sub">CREATE HOLE (temporarily disabled for 24 hours)</a>
|
||||||
{% if v.mods(sub.name) %}
|
{% if v.mods(sub.name) %}
|
||||||
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">HOLE SETTINGS</a>
|
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">HOLE SETTINGS</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue