remotes/1693045480750635534/spooky-22
Aevann1 2021-11-14 00:43:26 +02:00
parent 37f24e4d2b
commit 4af4ef3319
5 changed files with 15 additions and 15 deletions

View File

@ -56,7 +56,7 @@ def truescore(v):
@limiter.limit("1/second")
@admin_level_required(6)
def revert_actions(v, username):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host):
user = get_user(username)
if not user: abort(404)
@ -142,7 +142,7 @@ def club_ban(v, username):
@limiter.limit("1/second")
@admin_level_required(6)
def make_admin(v, username):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host):
user = get_user(username)
if not user: abort(404)
user.admin_level = 6
@ -155,7 +155,7 @@ def make_admin(v, username):
@limiter.limit("1/second")
@admin_level_required(6)
def remove_admin(v, username):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host):
user = get_user(username)
if not user: abort(404)
user.admin_level = 0
@ -168,7 +168,7 @@ def remove_admin(v, username):
@limiter.limit("1/second")
@admin_level_required(6)
def make_fake_admin(v, username):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host):
user = get_user(username)
if not user: abort(404)
user.admin_level = 1
@ -181,7 +181,7 @@ def make_fake_admin(v, username):
@limiter.limit("1/second")
@admin_level_required(6)
def remove_fake_admin(v, username):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host):
user = get_user(username)
if not user: abort(404)
user.admin_level = 0
@ -194,7 +194,7 @@ def remove_fake_admin(v, username):
@limiter.limit("1/day")
@admin_level_required(6)
def monthly(v):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,30,995,2513,3333]) or ('rama' not in request.host and 'pcm' not in request.host):
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
for u in g.db.query(User).filter(User.patron > 0).all():
if u.patron == 1: procoins = 2000

View File

@ -601,7 +601,7 @@ def award_comment(cid, v):
@admin_level_required(6)
def admin_userawards_get(v):
if request.host == 'rdrama.net' and v.id not in [1,28,995,2513]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
if request.host == 'rdrama.net' and v.id not in [1,28,30,995,2513,3333]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v)
@app.post("/admin/awards")
@ -650,7 +650,7 @@ def admin_userawards_post(v):
g.db.commit()
if request.host == 'rdrama.net' and v.id not in [1,28,995,2513]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
if request.host == 'rdrama.net' and v.id not in [1,28,30,995,2513,3333]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v)

View File

@ -214,7 +214,7 @@ def edit_post(pid, v):
p = get_post(pid)
if p.author_id != v.id and not (v.admin_level == 6 and v.id in [1,28,995,2513]): abort(403)
if p.author_id != v.id and not (v.admin_level == 6 and v.id in [1,28,30,995,2513,3333]): abort(403)
title = request.values.get("title", "").strip()
body = request.values.get("body", "").strip()

View File

@ -106,7 +106,7 @@
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
<script src="/assets/js/new_comments_count.js?v=53"></script>
{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,995,2513]) %}
{% if v and (v.id == p.author_id or v.admin_level == 6 and v.id in [1,28,30,995,2513,3333]) %}
<script>
togglePostEdit=function(id){
@ -316,7 +316,7 @@
<ul class="list-group post-actions">
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) %}
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,30,995,2513,3333]) %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
{% endif %}
@ -555,7 +555,7 @@
</div>
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) and not v.is_suspended %}
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,30,995,2513,3333]) and not v.is_suspended %}
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
<form id="post-edit-form-{{p.id}}" class="d-flex flex-column input-group" action="/edit_post/{{p.id}}" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
@ -600,7 +600,7 @@
</a>
</li>
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) %}
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,30,995,2513,3333]) %}
<a class="list-inline-item" href="javascript:void(0)" onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</a>
{% endif %}

View File

@ -217,7 +217,7 @@
{% endif %}
{% endif %}
{% if 'rama' in request.host and v.id in [1,28,995,2513] %}
{% if 'rama' in request.host and v.id in [1,28,30,995,2513,3333] %}
<a id="admin" class="{% if u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/make_admin','admin','unadmin')">Make admin</a>
<a id="unadmin" class="{% if not u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/remove_admin','admin','unadmin')">Remove admin</a>
@ -509,7 +509,7 @@
{% endif %}
{% endif %}
{% if 'rama' in request.host and v.id in [1,28,995,2513] %}
{% if 'rama' in request.host and v.id in [1,28,30,995,2513,3333] %}
<a id="admin2" class="{% if u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/make_admin','admin2','unadmin2')">Make admin</a>
<a id="unadmin2" class="{% if not u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/remove_admin','admin2','unadmin2')">Remove admin</a>