summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-21 12:29:28 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-21 12:29:28 +0200
commit419b6653b5177e599558991aaa6dbe71803a0f87 (patch)
tree5bdae749f1b44e1525c122fb983fe78aa0cacecb /server.js
parent2d1c2728bece17648328aa7de4e74b369edd792c (diff)
downloadserver-419b6653b5177e599558991aaa6dbe71803a0f87.tar.gz
Use env to control presence of tournaments.
Diffstat (limited to 'server.js')
-rw-r--r--server.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/server.js b/server.js
index 21a6daa..10eafc0 100644
--- a/server.js
+++ b/server.js
@@ -198,6 +198,7 @@ app.locals.SITE_IMPRINT = process.env.SITE_IMPRINT
app.locals.ENABLE_MAIL = !!mailer
app.locals.ENABLE_WEBHOOKS = !!WEBHOOKS
app.locals.ENABLE_FORUM = process.env.FORUM | 0
+app.locals.ENABLE_TOURNAMENTS = process.env.TOURNAMENTS | 0
app.locals.EMOJI_PRIVATE = "\u{1F512}" // or 512
app.locals.EMOJI_MATCH = "\u{1f3c6}"
@@ -3361,8 +3362,10 @@ function tournament_ticker() {
}
}
-setTimeout(tournament_ticker, 19 * 1000)
-setInterval(tournament_ticker, 97 * 1000)
+if (app.locals.ENABLE_TOURNAMENTS) {
+ setTimeout(tournament_ticker, 19 * 1000)
+ setInterval(tournament_ticker, 97 * 1000)
+}
/*
* GAME SERVER