From 7c8f8a358ac4fd971b0f67b50f17dcde0c1198a5 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 28 Mar 2016 19:26:37 -0600 Subject: [PATCH 1/3] Add conf change for luciano_blocktronics theme --- mods/themes/luciano_blocktronics/CCHANGE.ANS | Bin 0 -> 2035 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mods/themes/luciano_blocktronics/CCHANGE.ANS diff --git a/mods/themes/luciano_blocktronics/CCHANGE.ANS b/mods/themes/luciano_blocktronics/CCHANGE.ANS new file mode 100644 index 0000000000000000000000000000000000000000..885b3cc9bc181f04ca6b953688abc2511344fa5c GIT binary patch literal 2035 zcmb_d%We}f6iru1-Lfgn#+$D3%p{XSR$&wsB#MASH(5ndcDP6p@DcnC{hcxOpH!T4 zu04rRmjp56v9IrW+-tX5`^D5RS|6%)?fYuoHX+7pJ?rs!*~imrJ?~?3&f$N4ITtk( zT}l>^YzHP7h)2W_b6uYhip(uD&jVJ4@PJpnXuGidv|76U&GP-_ssa;$yN6Rm{U(DH z2kdQI5vmtc42EG)BEF_R@Hy8qK7faZ0Yn!Qs6z#~B+g+oF_{EO0o8IhCl(+UkvUp6 zLUtkHWlMsZldJ(?xd{WtjYM_f{N}1wrjD8H%Lkw%PBI)w6eytJB7??WL>6M&$nAQhd4l5wcl!f2v>;MuSYTB9B&DNf}N+S$M% z)L12UktJizRcl##q!ZysLLX&d`b-vhX8^qFz}#6Zn+~7{D*-Qo$&_dXl#@$H$T`uc zMjNZBMIKZQX|T#b4yn)3rLr}9stzKF1ZC`Jq+%Q!W~>%QTF8(keJ&k==_j|bN2y^1 z;Yne8N)|>V9;`$ZQ>bkZRiy9e)RF;I(5f_qvav&7tR_CZnwZ$~5vx{K2xlm0X%9XR zCK#}Jz#KKLyC}9K)!7Wu`KGm04=DLP>ima2&W?*LEBa6d$usrUNb2s6q|}G-iTvf8 z>dgY=16}4zBjC_kQFx1Ge3+EOC?T7e+dzlZ4D4hCDA`=*RLqt7qday2Ao|ESWj~<7 zNXKjEqUV)kiQCKtm0=z7;lL2?%QKY>+)E*OhZTOJZ}c#v0_$Yn&{>bwP}12(K%e8{ z6g)0Dq*vO z-uB0Szq|eJHv8QsBfheg^Uv=Z1~SZKHsS0UzI Date: Mon, 28 Mar 2016 19:36:09 -0600 Subject: [PATCH 2/3] * Fix a few bugs with import - use eachSeries() for packet import to properly handle SQL transaction with 2:n packets --- core/scanner_tossers/ftn_bso.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index 18ef9f45..d3cda0f7 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -734,7 +734,7 @@ function FTNMessageScanTossModule() { } Message.getMessageIdsByMetaValue('FtnKludge', 'MSGID', message.meta.FtnKludge.REPLY, (err, msgIds) => { - if(!err) { + if(msgIds && msgIds.length > 0) { assert(1 === msgIds.length); message.replyToMsgId = msgIds[0]; } @@ -874,10 +874,13 @@ function FTNMessageScanTossModule() { }, function importPacketFiles(packetFiles, callback) { let rejects = []; - async.each(packetFiles, (packetFile, nextFile) => { - self.importMessagesFromPacketFile(paths.join(importDir, packetFile), '', err => { - // :TODO: check err -- log / track rejects, etc. + async.eachSeries(packetFiles, (packetFile, nextFile) => { + self.importMessagesFromPacketFile(paths.join(importDir, packetFile), '', err => { if(err) { + Log.debug( + { path : paths.join(importDir, packetFile), error : err.toString() }, + 'Failed to import packet file'); + rejects.push(packetFile); } nextFile(); @@ -920,7 +923,15 @@ function FTNMessageScanTossModule() { }, function discoverBundles(callback) { fs.readdir(importDir, (err, files) => { - files = files.filter(f => '.pkt' !== paths.extname(f)); + // :TODO: Need to be explicit about files to attempt an extract, e.g. *.su?, *.mo?, ... + // :TODO: if we do much more of this, probably just use the glob module + //files = files.filter(f => '.pkt' !== paths.extname(f)); + + const bundleRegExp = /\.(su|mo|tu|we|th|fr|sa)[0-9A-Za-z]/; + files = files.filter(f => { + const fext = paths.extname(f); + return bundleRegExp.test(fext); + }); async.map(files, (file, transform) => { const fullPath = paths.join(importDir, file); From b5a4fadb9203b3138cdd6a55bdab346042812e98 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 28 Mar 2016 19:58:07 -0600 Subject: [PATCH 3/3] originName -> originLine --- core/ftn_util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ftn_util.js b/core/ftn_util.js index e46ee12c..f1d0860e 100644 --- a/core/ftn_util.js +++ b/core/ftn_util.js @@ -220,8 +220,8 @@ function getQuotePrefix(name) { // http://ftsc.org/docs/fts-0004.001 // function getOrigin(address) { - const origin = _.has(Config.messageNetworks.originName) ? - Config.messageNetworks.originName : + const origin = _.has(Config, 'messageNetworks.originLine') ? + Config.messageNetworks.originLine : Config.general.boardName; const addrStr = new Address(address).toString('5D');