Skip to content
Snippets Groups Projects
Commit d012ee0f authored by rswindell's avatar rswindell
Browse files

Use the nodelist_options.js library for easy caching of the nodelist options

(in bbs.mods).
parent ea68e576
No related branches found
No related tags found
No related merge requests found
...@@ -46,23 +46,9 @@ if(!presence) { ...@@ -46,23 +46,9 @@ if(!presence) {
writeln(); writeln();
if(js.global.bbs) { if(js.global.bbs) {
var options = bbs.mods.nodelist_options; var options = bbs.mods.nodelist_options;
if(!bbs.mods.nodelist_options) { if(!options)
options = load({}, "modopts.js", "nodelist"); options = load({}, "nodelist_options.js");
if(!options) write(bbs.text(NodeLstHdr));
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));
} else{ // e.g. invoked via JSexec } else{ // e.g. invoked via JSexec
var REVISION = "$Revision$".split(' ')[1]; var REVISION = "$Revision$".split(' ')[1];
options = { options = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment