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

Alternatively, a new-user default avatar may be imported (as needed) from

a .bin file. Use the "avatar_file" key to specify a filename to pull from
and (optionally) "avatar_offset" to specify the (0-based) record number of
the avatar to use. If no "avatar_offset" value is specified, an avatar is
choosen at random from the .bin file. If there is only one avatar in the
file, then that's the one they'll get (regardless of avatar_offset value).
parent 73262e0c
No related branches found
No related tags found
No related merge requests found
......@@ -18,9 +18,12 @@ if(options && (bbs.sys_status&SS_RLOGIN))
if(options && options.qwk_settings)
user.qwk_settings = eval(options.qwk_settings);
if(options && options.avatar) {
var avatar = load({}, 'avatar_lib.js');
avatar.update_localuser(user.number, options.avatar);
if(options && (options.avatar || options.avatar_file)) {
var avatar_lib = load({}, 'avatar_lib.js');
if(options.avatar_file)
avatar_lib.import_file(user.number, options.avatar_file, options.avatar_offset);
else
avatar_lib.update_localuser(user.number, options.avatar);
}
console.clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment