disallow creating !everyone

pull/136/head
Aevann 2023-03-02 21:21:38 +02:00
parent 5e3980011b
commit e9a15cd0b8
1 changed files with 20 additions and 19 deletions

View File

@ -28,8 +28,9 @@ def create_group(v):
if not valid_sub_regex.fullmatch(name):
return redirect(f"/ping_groups?error=Name does not match the required format!")
group = g.db.get(Group, name)
if not group:
if name == 'everyone' or g.db.get(Group, name):
return redirect(f"/ping_groups?error=This group already exists!")
if not v.charge_account('coins', GROUP_COST):
return redirect(f"/ping_groups?error=You don't have enough coins!")