From d7ae1e694112d6a4bfc9d528aa738fb04946a0b3 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 15 Sep 2023 20:50:51 +0200 Subject: 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. --- public/join.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/join.js') diff --git a/public/join.js b/public/join.js index 362800d..a22e0fa 100644 --- a/public/join.js +++ b/public/join.js @@ -213,7 +213,9 @@ function update() { break case 1: case 0: - if (game.owner_id === user_id) + if (limit) + element.innerHTML = `Empty` + else if (game.owner_id === user_id) element.innerHTML = `\xbb Join\u{2795}` else element.innerHTML = `\xbb Join` -- cgit v1.2.3