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

Implement the "maint" command handler:

- uses the sbbslist_lib.remove_inactive() method
- uses the (new) max_inactivity (days) value from modopts.ini [sbbslist]
  (default: 180 days)
- supports the -v (verbose) option to display details about entries being
  removed due to inactivity (if desired)
parent 693a208e
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,8 @@ if(!options)
options = {};
if(!options.sub)
options.sub = load({}, "syncdata.js").find();
if(!options.max_inactivity)
options.max_inactivity = 180; // Days
if(options && options.format > 0)
list_format = options.format;
if(options && options.export_freq > 0)
......@@ -2493,7 +2495,10 @@ function main()
}
break;
case "maint":
alert("Not yet implemented");
print(list.length + " BBS entries before maintenance");
var list = lib.remove_inactive(list, options.max_inactivity, verbose);
print(list.length + " BBS entries after maintenance");
lib.write_list(list);
break;
case "install":
var result = install();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment