From f8c49906462d3776ffc3d2c879cf13127068595c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 1 Oct 2016 13:22:34 -0600 Subject: [PATCH 1/3] Add 'pcansi' support for ZOC terminal --- core/client_term.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/client_term.js b/core/client_term.js index 8ef4753d..c9a9e66f 100644 --- a/core/client_term.js +++ b/core/client_term.js @@ -131,15 +131,16 @@ ClientTerminal.prototype.isANSI = function() { // ansi-bbs: // * fTelnet // + // pcansi: + // * ZOC + // // screen: // * ConnectBot (Android) // // linux: // * JuiceSSH (note: TERM=linux also) // - - // :TODO: Others?? - return [ 'ansi', 'pc-ansi', 'ansi-bbs', 'qansi', 'scoansi', 'syncterm' ].indexOf(this.termType) > -1; + return [ 'ansi', 'pcansi', 'pc-ansi', 'ansi-bbs', 'qansi', 'scoansi', 'syncterm' ].indexOf(this.termType) > -1; }; // :TODO: probably need to update these to convert IAC (0xff) -> IACIAC (escape it) From 0a98ce651ff40c29507b831564b27a5afe627f47 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 2 Oct 2016 13:47:19 -0600 Subject: [PATCH 2/3] #101 set real names for message areas --- core/fse.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/fse.js b/core/fse.js index 414c10ef..0afc31c1 100644 --- a/core/fse.js +++ b/core/fse.js @@ -8,6 +8,7 @@ const ansi = require('./ansi_term.js'); const theme = require('./theme.js'); const Message = require('./message.js'); const updateMessageAreaLastReadId = require('./message_area.js').updateMessageAreaLastReadId; +const getMessageAreaByTag = require('./message_area.js').getMessageAreaByTag; const getUserIdAndName = require('./user.js').getUserIdAndName; const cleanControlCodes = require('./string_util.js').cleanControlCodes; const StatLog = require('./stat_log.js'); @@ -563,8 +564,14 @@ function FullScreenEditorModule(options) { break; case 'edit' : - self.viewControllers.header.getView(1).setText(self.client.user.username); // from - + const fromView = self.viewControllers.header.getView(1); + const area = getMessageAreaByTag(self.messageAreaTag); + if(area && area.realNames) { + fromView.setText(self.client.user.properties.real_name || self.client.user.username); + } else { + fromView.setText(self.client.user.username); + } + if(self.replyToMessage) { self.initHeaderReplyEditMode(); } From 6f3fe7c52de27bdcbc40275f1165de875cc60ee7 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 6 Dec 2016 20:51:48 -0700 Subject: [PATCH 3/3] #103: FTN PKT files need to be uppercase --- core/scanner_tossers/ftn_bso.js | 65 ++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index b5e65227..1257fc34 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -167,7 +167,7 @@ function FTNMessageScanTossModule() { return dir; }; - this.getOutgoingPacketFileName = function(basePath, messageId, isTemp) { + this.getOutgoingPacketFileName = function(basePath, messageId, isTemp, fileCase) { // // Generating an outgoing packet file name comes with a few issues: // * We must use DOS 8.3 filenames due to legacy systems that receive @@ -185,12 +185,18 @@ function FTNMessageScanTossModule() { // * We already have a system for 8-character serial number gernation that is // used for e.g. in FTS-0009.001 MSGIDs... let's use that! // - const name = ftnUtil.getMessageSerialNumber(messageId); - const ext = (true === isTemp) ? 'pk_' : 'pkt'; - return paths.join(basePath, `${name}.${ext}`); + const name = ftnUtil.getMessageSerialNumber(messageId); + const ext = (true === isTemp) ? 'pk_' : 'pkt'; + + let fileName = `${name}.${ext}`; + if('upper' === fileCase) { + fileName = fileName.toUpperCase(); + } + + return paths.join(basePath, fileName); }; - this.getOutgoingFlowFileExtension = function(destAddress, flowType, exportType) { + this.getOutgoingFlowFileExtension = function(destAddress, flowType, exportType, fileCase) { let ext; switch(flowType) { @@ -200,13 +206,23 @@ function FTNMessageScanTossModule() { case 'request' : ext = 'req'; break; case 'requests' : ext = 'hrq'; break; } + + if('upper' === fileCase) { + ext = ext.toUpperCase(); + } return ext; }; - this.getOutgoingFlowFileName = function(basePath, destAddress, flowType, exportType) { + this.getOutgoingFlowFileName = function(basePath, destAddress, flowType, exportType, fileCase) { let basename; - const ext = self.getOutgoingFlowFileExtension(destAddress, flowType, exportType); + + const ext = self.getOutgoingFlowFileExtension( + destAddress, + flowType, + exportType, + fileCase + ); if(destAddress.point) { @@ -219,6 +235,10 @@ function FTNMessageScanTossModule() { `0000${destAddress.net.toString(16)}`.substr(-4) + `0000${destAddress.node.toString(16)}`.substr(-4); } + + if('upper' === fileCase) { + basename = basename.toUpperCase(); + } return paths.join(basePath, `${basename}.${ext}`); }; @@ -549,7 +569,13 @@ function FTNMessageScanTossModule() { packetHeader.password = exportOpts.nodeConfig.packetPassword || ''; // use current message ID for filename seed - const pktFileName = self.getOutgoingPacketFileName(self.exportTempDir, message.messageId, createTempPacket); + const pktFileName = self.getOutgoingPacketFileName( + self.exportTempDir, + message.messageId, + createTempPacket, + exportOpts.fileCase + ); + exportedFiles.push(pktFileName); ws = fs.createWriteStream(pktFileName); @@ -629,7 +655,13 @@ function FTNMessageScanTossModule() { packetHeader.password = exportOpts.nodeConfig.packetPassword || ''; // use current message ID for filename seed - const pktFileName = self.getOutgoingPacketFileName(self.exportTempDir, remainMessageId, createTempPacket); + const pktFileName = self.getOutgoingPacketFileName( + self.exportTempDir, + remainMessageId, + createTempPacket, + exportOpts.filleCase + ); + exportedFiles.push(pktFileName); ws = fs.createWriteStream(pktFileName); @@ -666,6 +698,7 @@ function FTNMessageScanTossModule() { network : Config.messageNetworks.ftn.networks[areaConfig.network], destAddress : Address.fromString(uplink), networkName : areaConfig.network, + fileCase : self.moduleConfig.nodes[nodeConfigKey].fileCase || 'lower', }; if(_.isString(exportOpts.network.localAddress)) { @@ -717,19 +750,21 @@ function FTNMessageScanTossModule() { function moveFilesToOutgoing(exportedFileNames, callback) { async.each(exportedFileNames, (oldPath, nextFile) => { const ext = paths.extname(oldPath).toLowerCase(); - if('.pk_' === ext) { + if('.pk_' === ext.toLowerCase()) { // // For a given temporary .pk_ file, we need to move it to the outoing // directory with the appropriate BSO style filename. // - const ext = self.getOutgoingFlowFileExtension( + const newExt = self.getOutgoingFlowFileExtension( exportOpts.destAddress, 'mail', - exportType); + exportType, + exportOpts.fileCase + ); const newPath = paths.join( outgoingDir, - `${paths.basename(oldPath, 'pk_')}${ext}`); + `${paths.basename(oldPath, ext)}${newExt}`); fse.move(oldPath, newPath, nextFile); } else { @@ -750,7 +785,9 @@ function FTNMessageScanTossModule() { outgoingDir, exportOpts.destAddress, 'ref', - exportType); + exportType, + exportOpts.fileCase + ); // directive of '^' = delete file after transfer self.flowFileAppendRefs(flowFilePath, [ newPath ], '^', err => {