From d012ee0f512e8ab340897130376574977f491583 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 29 Jan 2019 10:29:34 +0000 Subject: [PATCH] Use the nodelist_options.js library for easy caching of the nodelist options (in bbs.mods). --- exec/nodelist.js | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/exec/nodelist.js b/exec/nodelist.js index 7badd4b3c3..8a38291eef 100644 --- a/exec/nodelist.js +++ b/exec/nodelist.js @@ -46,23 +46,9 @@ if(!presence) { writeln(); if(js.global.bbs) { var options = bbs.mods.nodelist_options; - if(!bbs.mods.nodelist_options) { - options = load({}, "modopts.js", "nodelist"); - if(!options) - options = {}; - if(!options.format) - options.format = "\x01n\x01h%3d \x01n\x01g%s"; - if(!options.username_prefix) - options.username_prefix = '\x01h'; - if(!options.status_prefix) - options.status_prefix = '\x01n\x01g'; - if(!options.errors_prefix) - options.errors_prefix = '\x01h\x01r'; - if(!options.web_inactivity) - options.web_inactivity = load({}, "modopts.js", "web", "inactivity"); - bbs.mods.nodelist_options = options; // cache the options - } - console.print(bbs.text(NodeLstHdr)); + if(!options) + options = load({}, "nodelist_options.js"); + write(bbs.text(NodeLstHdr)); } else{ // e.g. invoked via JSexec var REVISION = "$Revision$".split(' ')[1]; options = { -- GitLab