fd
This commit is contained in:
parent
c72a9aff59
commit
1e2d42394a
2 changed files with 19 additions and 14 deletions
|
@ -152,7 +152,7 @@ if SITE in {'rdrama.net','devrama.xyz'}:
|
||||||
AUTOCHOICE_ID = 9167
|
AUTOCHOICE_ID = 9167
|
||||||
BASEDBOT_ID = 0
|
BASEDBOT_ID = 0
|
||||||
|
|
||||||
PW_ID = 3750
|
MENTION_ID = 9376
|
||||||
KIPPY_ID = 7150
|
KIPPY_ID = 7150
|
||||||
TAX_NOTIF_ID = 995
|
TAX_NOTIF_ID = 995
|
||||||
PIZZASHILL_ID = 2424
|
PIZZASHILL_ID = 2424
|
||||||
|
@ -184,7 +184,7 @@ elif SITE == "pcmemes.net":
|
||||||
AUTOCHOICE_ID = 2072
|
AUTOCHOICE_ID = 2072
|
||||||
BASEDBOT_ID = 800
|
BASEDBOT_ID = 800
|
||||||
|
|
||||||
PW_ID = 0
|
MENTION_ID = 0
|
||||||
KIPPY_ID = 1592
|
KIPPY_ID = 1592
|
||||||
PIZZASHILL_ID = 0
|
PIZZASHILL_ID = 0
|
||||||
TAX_NOTIF_ID = 1592
|
TAX_NOTIF_ID = 1592
|
||||||
|
@ -216,7 +216,7 @@ else:
|
||||||
AUTOCHOICE_ID = 8
|
AUTOCHOICE_ID = 8
|
||||||
BASEDBOT_ID = 0
|
BASEDBOT_ID = 0
|
||||||
|
|
||||||
PW_ID = 0
|
MENTION_ID = 0
|
||||||
KIPPY_ID = 0
|
KIPPY_ID = 0
|
||||||
TAX_NOTIF_ID = 9
|
TAX_NOTIF_ID = 9
|
||||||
PIZZASHILL_ID = 0
|
PIZZASHILL_ID = 0
|
||||||
|
|
|
@ -256,10 +256,13 @@ def remove_mod(v, sub):
|
||||||
@app.get("/create_sub")
|
@app.get("/create_sub")
|
||||||
@is_not_permabanned
|
@is_not_permabanned
|
||||||
def create_sub(v):
|
def create_sub(v):
|
||||||
|
if v.id == MENTION_ID: cost = 0
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,6 +278,7 @@ def create_sub2(v):
|
||||||
|
|
||||||
sub = g.db.query(Sub).filter_by(name=name).one_or_none()
|
sub = g.db.query(Sub).filter_by(name=name).one_or_none()
|
||||||
if not sub:
|
if not sub:
|
||||||
|
if v.id != MENTION_ID:
|
||||||
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
|
||||||
|
@ -284,6 +288,7 @@ def create_sub2(v):
|
||||||
return render_template("sub/create_sub.html", v=v, error="You don't have enough coins!"), 403
|
return render_template("sub/create_sub.html", v=v, error="You don't have enough coins!"), 403
|
||||||
|
|
||||||
v.coins -= cost
|
v.coins -= cost
|
||||||
|
|
||||||
v.subs_created += 1
|
v.subs_created += 1
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue