diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-21 12:29:28 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-21 12:29:28 +0200 |
commit | 419b6653b5177e599558991aaa6dbe71803a0f87 (patch) | |
tree | 5bdae749f1b44e1525c122fb983fe78aa0cacecb /server.js | |
parent | 2d1c2728bece17648328aa7de4e74b369edd792c (diff) | |
download | server-419b6653b5177e599558991aaa6dbe71803a0f87.tar.gz |
Use env to control presence of tournaments.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |