Skip to content
Snippets Groups Projects
Commit fbde71cc authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

A birthday list module

By default, displays users of the BBS born in the current month.
parent 4d3d8d94
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #628 passed
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();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment