Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit fbde71cc authored by Rob Swindell's avatar Rob Swindell 💬

A birthday list module

By default, displays users of the BBS born in the current month.
parent 4d3d8d94
Pipeline #628 passed with stage
in 13 minutes and 34 seconds
require('sbbsdefs.js', 'LEN_ALIAS');
var month = argv[0];
var day = argv[1];
if(month === undefined)
month = new Date().getMonth();
var list = load({}, "birthdays.js", month, day);
var monthNameList = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
if(js.global.console) console.attributes = HIGH;
print(format("%u %s users with birthdays in %s:", list.length, system.name, monthNameList[month]));
for(var i = 0; i < list.length; i++) {
if(js.global.console) console.attributes = HIGH | ((i&1) ? CYAN : MAGENTA);
var u = User(list[i]);
var str = format("%-*s ", LEN_ALIAS, u.alias);
if((js.global.console && console.current_column + str.length > console.screen_columns) || (!js.global.console && i > 0 && i % 3 == 0))
print();
write(str);
}
print();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment