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

This script may be used in place of showmsghdr.js if you already have a

custom msghdr.asc and want to continue to use it (with avatars). Just add
@exec:showmsgavatar@ (uppercase) below your custom header in msghdr.asc.
parent 6aa8dd50
Branches
Tags
No related merge requests found
// $Id$
// This can be loaded from text/menu/msghdr.asc via @EXEC:SHOWMSGAVATAR@
// Don't forget to include or exclude the blank line after if you do
// (or don't) want a blank line separating message headers and body text
// This script may be used instead of (not in addition to) showmsghdr.js
// Use this script if you have/want a custom message header defined in
// msghdr.asc, i.e. with @-codes (not using text.dat strings).
// If you do not want the avatar right-justified, copy this file to your
// mods directory and change that parameter below.
load('smbdefs.js');
var USER_ANSI =(1<<1);
// Avatar support here:
if(!(bbs.msg_attr&MSG_ANONYMOUS) && console.term_supports(USER_ANSI)) {
var Avatar = load({}, 'avatar_lib.js');
Avatar.draw(bbs.msg_from_ext, bbs.msg_from, bbs.msg_from_net, /* above: */true, /* right-justified: */true);
console.attributes = 0; // Clear the background attribute as the next line might scroll, filling with BG attribute
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment