summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-30 21:40:50 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-30 21:41:53 +0100
commitcc4497e145f89bda07bafc443e4a795a1d70472a (patch)
treeed0d83d14d80002400363346fddef9cdf499e124
parent0930089a79d8eda142e0c6e94d163394f7671228 (diff)
downloadserver-cc4497e145f89bda07bafc443e4a795a1d70472a.tar.gz
Flag 1-player games as private when started.
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.js b/server.js
index 6f686d2..84c7d70 100644
--- a/server.js
+++ b/server.js
@@ -1171,7 +1171,7 @@ const SQL_DELETE_GAME = SQL("DELETE FROM games WHERE game_id=? AND owner_id=?")
const SQL_START_GAME = SQL(`
update games set
status = 1,
- is_private = (is_private or user_count < player_count),
+ is_private = (is_private or user_count = 1 or user_count < player_count),
mtime = datetime(),
active = ?
where