Merge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-05-23 00:21:13 +02:00
commit f0dec0d06d
3 changed files with 8 additions and 10 deletions

View File

@ -223,14 +223,14 @@ def remove_mod(v, sub):
@app.get("/create_sub")
@is_not_permabanned
def create_sub(v):
if SITE_NAME != 'PCM' and v.admin_level < 3: abort(403)
if request.host == 'rdrama.net': cost = 0
if request.host == 'rdrama.net':
if v.admin_level < 3: abort(403)
cost = 0
else:
num = v.subs_created + 1
for a in v.alts:
num += a.subs_created
cost = num * 100
cost = num * 10000
return render_template("sub/create_sub.html", v=v, cost=cost)
@ -249,7 +249,7 @@ def create_sub2(v):
num = v.subs_created + 1
for a in v.alts:
num += a.subs_created
cost = num * 100
cost = num * 10000
if not valid_sub_regex.fullmatch(name):
return render_template("sub/create_sub.html", v=v, cost=cost, error="Sub name not allowed."), 400

View File

@ -18,9 +18,7 @@
<div class="mb-4">{{sub.sidebar_html|safe}}</div>
{% endif %}
{% if v %}
{% if v.admin_level > 2 %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% if v.mods(sub.name) %}
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/settings">HOLE SETTINGS</a>
{% endif %}
@ -29,7 +27,7 @@
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">HOLE EXILEES</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
{% else %}
{% if v and v.admin_level > 2 %}
{% if v %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/holes">BROWSE HOLES</a>

View File

@ -95,7 +95,7 @@
{% endif %}
{% if p.award_count("ricardo") %}
<script src="/assets/js/ricardo.js?v=1"></script>
<script src="/assets/js/ricardo.js?v=2"></script>
<div id="ricardo1" class="ricardo ricardoleft">
<img src="/assets/images/ricardo1.webp">
</div>