From 419b6653b5177e599558991aaa6dbe71803a0f87 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 21 Oct 2024 12:29:28 +0200 Subject: Use env to control presence of tournaments. --- server.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'server.js') 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 -- cgit v1.2.3