diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-09-15 20:50:51 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-09-18 21:16:47 +0200 |
commit | d7ae1e694112d6a4bfc9d528aa738fb04946a0b3 (patch) | |
tree | fc4f1c147d5a7887f98240df2851a3ee8f039b29 /views/join.pug | |
parent | 9e77cf5b29a533faf1909327772359d189e527b1 (diff) | |
download | server-d7ae1e694112d6a4bfc9d528aa738fb04946a0b3.tar.gz |
Enforce limits on how many games you can create and join.
Also limit joining more games if you have too many games waiting.
Generous default limits: 7 open, 29 active, and 3 waiting.
Diffstat (limited to 'views/join.pug')
-rw-r--r-- | views/join.pug | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/views/join.pug b/views/join.pug index ced1fe3..3110bd3 100644 --- a/views/join.pug +++ b/views/join.pug @@ -27,6 +27,7 @@ html let whitelist = !{ JSON.stringify(whitelist) } let blacklist = !{ JSON.stringify(blacklist) } let friends = !{ JSON.stringify(friends) } + let limit = !{ !!limit } let ready = !{ ready } script(src="/join.js") body @@ -36,6 +37,9 @@ html h1 #{game.title_name} else h1 #{game.title_name} - #{game.scenario} + + if limit + p.error= limit p.error#error div.logo |