NetMail avail to oputil & export - WIP

This commit is contained in:
Bryan Ashby 2017-12-31 17:54:11 -07:00
parent 1c5a00313b
commit fc40641eeb
12 changed files with 961 additions and 420 deletions

View file

@ -26,6 +26,7 @@ exports.getUTCTimeZoneOffset = getUTCTimeZoneOffset;
exports.getOrigin = getOrigin;
exports.getTearLine = getTearLine;
exports.getVia = getVia;
exports.getIntl = getIntl;
exports.getAbbreviatedNetNodeList = getAbbreviatedNetNodeList;
exports.parseAbbreviatedNetNodeList = parseAbbreviatedNetNodeList;
exports.getUpdatedSeenByEntries = getUpdatedSeenByEntries;
@ -222,6 +223,20 @@ function getVia(address) {
return `${addrStr} @${dateTime} ENiGMA1/2 ${version}`;
}
//
// Creates a INTL kludge value as per FTS-4001
// http://retro.fidoweb.ru/docs/index=ftsc&doc=FTS-4001&enc=mac
//
function getIntl(toAddress, fromAddress) {
//
// INTL differs from 'standard' kludges in that there is no ':' after "INTL"
//
// "<SOH>"INTL "<destination address>" "<origin address><CR>"
// "...These addresses shall be given on the form <zone>:<net>/<node>"
//
return `${toAddress.toString('3D')} ${fromAddress.toString('3D')}`;
}
function getAbbreviatedNetNodeList(netNodes) {
let abbrList = '';
let currNet;