master
Aevann1 2022-02-26 11:23:56 +02:00
parent ca6eb51e6e
commit ea022d779a
2 changed files with 19 additions and 14 deletions

View File

@ -152,7 +152,7 @@ if SITE in {'rdrama.net','devrama.xyz'}:
AUTOCHOICE_ID = 9167
BASEDBOT_ID = 0
PW_ID = 3750
MENTION_ID = 9376
KIPPY_ID = 7150
TAX_NOTIF_ID = 995
PIZZASHILL_ID = 2424
@ -184,7 +184,7 @@ elif SITE == "pcmemes.net":
AUTOCHOICE_ID = 2072
BASEDBOT_ID = 800
PW_ID = 0
MENTION_ID = 0
KIPPY_ID = 1592
PIZZASHILL_ID = 0
TAX_NOTIF_ID = 1592
@ -216,7 +216,7 @@ else:
AUTOCHOICE_ID = 8
BASEDBOT_ID = 0
PW_ID = 0
MENTION_ID = 0
KIPPY_ID = 0
TAX_NOTIF_ID = 9
PIZZASHILL_ID = 0

View File

@ -256,10 +256,13 @@ def remove_mod(v, sub):
@app.get("/create_sub")
@is_not_permabanned
def create_sub(v):
num = v.subs_created + 1
for a in v.alts:
num += a.subs_created
cost = num * 100
if v.id == MENTION_ID: cost = 0
else:
num = v.subs_created + 1
for a in v.alts:
num += a.subs_created
cost = num * 100
return render_template("sub/create_sub.html", v=v, cost=cost)
@ -275,15 +278,17 @@ def create_sub2(v):
sub = g.db.query(Sub).filter_by(name=name).one_or_none()
if not sub:
num = v.subs_created + 1
for a in v.alts:
num += a.subs_created
cost = num * 100
if v.id != MENTION_ID:
num = v.subs_created + 1
for a in v.alts:
num += a.subs_created
cost = num * 100
if v.coins < cost:
return render_template("sub/create_sub.html", v=v, error="You don't have enough coins!"), 403
if v.coins < cost:
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
g.db.add(v)