mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-11 15:14:36 +02:00
ANSI replies are now importing to Mysgic correctly!
* Removed XX> prefix when in ANSI reply mode -- this borks Mystic/others * Hard code CRLF in text lines in ANSI replies - no longer try to "flow" the text (no other systems support this)
This commit is contained in:
parent
d132f3932a
commit
f6f3f8d80e
6 changed files with 50 additions and 83 deletions
|
@ -668,17 +668,12 @@ function Packet(options) {
|
|||
const dateTimeBuffer = new Buffer(ftn.getDateTimeString(message.modTimestamp) + '\0');
|
||||
dateTimeBuffer.copy(basicHeader, 14);
|
||||
|
||||
// toUserName & fromUserName: up to 36 bytes in length, NULL term'd
|
||||
// :TODO: DRY...
|
||||
let toUserNameBuf = iconv.encode(message.toUserName + '\0', 'CP437').slice(0, 36);
|
||||
toUserNameBuf[toUserNameBuf.length - 1] = '\0'; // ensure it's null term'd
|
||||
|
||||
let fromUserNameBuf = iconv.encode(message.fromUserName + '\0', 'CP437').slice(0, 36);
|
||||
fromUserNameBuf[fromUserNameBuf.length - 1] = '\0'; // ensure it's null term'd
|
||||
|
||||
// subject: up to 72 bytes in length, NULL term'd
|
||||
let subjectBuf = iconv.encode(message.subject + '\0', 'CP437').slice(0, 72);
|
||||
subjectBuf[subjectBuf.length - 1] = '\0'; // ensure it's null term'd
|
||||
//
|
||||
// To, from, and subject must be NULL term'd and have max lengths as per spec.
|
||||
//
|
||||
const toUserNameBuf = strUtil.stringToNullTermBuffer(message.toUserName, { encoding : 'cp437', maxBufLen : 36 } );
|
||||
const fromUserNameBuf = strUtil.stringToNullTermBuffer(message.fromUserName, { encoding : 'cp437', maxBufLen : 36 } );
|
||||
const subjectBuf = strUtil.stringToNullTermBuffer(message.subject, { encoding : 'cp437', maxBufLen : 72 } );
|
||||
|
||||
//
|
||||
// message: unbound length, NULL term'd
|
||||
|
@ -686,7 +681,6 @@ function Packet(options) {
|
|||
// We need to build in various special lines - kludges, area,
|
||||
// seen-by, etc.
|
||||
//
|
||||
// :TODO: Put this in it's own method
|
||||
let msgBody = '';
|
||||
|
||||
//
|
||||
|
@ -717,7 +711,6 @@ function Packet(options) {
|
|||
{
|
||||
cols : 80,
|
||||
rows : 'auto',
|
||||
preserveTextLines : true,
|
||||
forceLineTerm : true,
|
||||
exportMode : true,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue