From e616cd369742b798bb7491c65e24c234dae0da06 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 18 Oct 2024 20:49:31 +0200 Subject: don't count future games against open game limit. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index b3a1cfb..3540a7c 100644 --- a/server.js +++ b/server.js @@ -1385,7 +1385,7 @@ const SQL_DELETE_PLAYER_ROLE = SQL("DELETE FROM players WHERE game_id=? AND role const SQL_SELECT_PLAYER_VIEW = SQL("select * from player_view where game_id = ?") -const SQL_COUNT_OPEN_GAMES = SQL(`SELECT COUNT(*) FROM games WHERE owner_id=? AND status=${STATUS_OPEN}`).pluck() +const SQL_COUNT_OPEN_GAMES = SQL(`SELECT COUNT(*) FROM games WHERE owner_id=? AND status=${STATUS_OPEN} and not is_match`).pluck() const SQL_COUNT_ACTIVE_GAMES = SQL(` select count(*) from games where status < 2 and exists ( -- cgit v1.2.3