summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-18 20:49:31 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-18 20:49:31 +0200
commite616cd369742b798bb7491c65e24c234dae0da06 (patch)
tree124991970adb6ed774078e5aae016f7cd007a4af /server.js
parent546dcc127754054347b08d74c945665cfe3c3f97 (diff)
downloadserver-e616cd369742b798bb7491c65e24c234dae0da06.tar.gz
don't count future games against open game limit.
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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 (