forked from rDrama/rDrama
dffd
parent
35cb331f5a
commit
7b648de549
|
@ -44,15 +44,13 @@ def get_user(username, v=None, graceful=False):
|
||||||
|
|
||||||
return user
|
return user
|
||||||
|
|
||||||
def get_account(id, v=None, graceful=False):
|
def get_account(id, v=None):
|
||||||
|
|
||||||
user = g.db.query(User).filter(User.id == id).first()
|
user = g.db.query(User).filter(User.id == id).first()
|
||||||
|
|
||||||
if not user:
|
if not user:
|
||||||
if not graceful:
|
user = g.db.query(User).filter(User.id == int(id, 36)).first()
|
||||||
abort(404)
|
if not user: abort(404)
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if v:
|
if v:
|
||||||
block = g.db.query(UserBlock).filter(
|
block = g.db.query(UserBlock).filter(
|
||||||
|
|
|
@ -333,7 +333,7 @@ def api_comment(v):
|
||||||
|
|
||||||
for alt in v.alts:
|
for alt in v.alts:
|
||||||
if not alt.is_suspended:
|
if not alt.is_suspended:
|
||||||
alt.ban(reason="Spamming.")
|
alt.ban(reason="Spamming.". days=1)
|
||||||
|
|
||||||
for comment in similar_comments:
|
for comment in similar_comments:
|
||||||
comment.is_banned = True
|
comment.is_banned = True
|
||||||
|
|
|
@ -742,7 +742,7 @@ def submit_post(v):
|
||||||
|
|
||||||
for alt in v.alts:
|
for alt in v.alts:
|
||||||
if not alt.is_suspended:
|
if not alt.is_suspended:
|
||||||
alt.ban(reason="Spamming.")
|
alt.ban(reason="Spamming.", days=1)
|
||||||
|
|
||||||
for post in similar_posts + similar_urls:
|
for post in similar_posts + similar_urls:
|
||||||
post.is_banned = True
|
post.is_banned = True
|
||||||
|
|
Loading…
Reference in New Issue