From c1f7eb05cae1860b4da9da1f94cb089b616f4be1 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Nov 2018 19:40:48 -0700 Subject: [PATCH 1/3] Better sanatization of menu/prompt.hjson files based on board name --- core/oputil/oputil_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/oputil/oputil_config.js b/core/oputil/oputil_config.js index 2e8b0add..dd6fc783 100644 --- a/core/oputil/oputil_config.js +++ b/core/oputil/oputil_config.js @@ -257,7 +257,7 @@ function buildNewConfig() { return; } - const bn = sanatizeFilename(config.general.boardName).replace(/ /g, '_').toLowerCase(); + const bn = sanatizeFilename(config.general.boardName).replace(/[^a-z0-9_\-]/ig, '_').toLowerCase(); const menuFile = `${bn}.hjson`; copyFileSyncSilent( paths.join(__dirname, '../../config/menu.hjson'), From d28b5ce3b2a0cbe0d9cf5dc4a627f4431a097cb5 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Nov 2018 19:44:27 -0700 Subject: [PATCH 2/3] Even better file name generation for new configs --- core/oputil/oputil_config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/oputil/oputil_config.js b/core/oputil/oputil_config.js index dd6fc783..40644dee 100644 --- a/core/oputil/oputil_config.js +++ b/core/oputil/oputil_config.js @@ -257,15 +257,18 @@ function buildNewConfig() { return; } - const bn = sanatizeFilename(config.general.boardName).replace(/[^a-z0-9_\-]/ig, '_').toLowerCase(); - const menuFile = `${bn}.hjson`; + const bn = sanatizeFilename(config.general.boardName) + .replace(/[^a-z0-9_\-]/ig, '_') + .replace(/_+/g, '_') + .toLowerCase(); + const menuFile = `${bn}-menu.hjson`; copyFileSyncSilent( paths.join(__dirname, '../../config/menu.hjson'), paths.join(__dirname, '../../config/', menuFile), fs.constants.COPYFILE_EXCL ); - const promptFile = `${bn}_prompt.hjson`; + const promptFile = `${bn}-prompt.hjson`; copyFileSyncSilent( paths.join(__dirname, '../../config/prompt.hjson'), paths.join(__dirname, '../../config/', promptFile), From 5b1412aa319f4e6908a8cb4dd97a869df0f59b22 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Nov 2018 19:59:56 -0700 Subject: [PATCH 3/3] * Clean up door examples in menu.hjson * Remove specific doors in default door menu; +op will need to add them as they configure them --- art/themes/luciano_blocktronics/DOORMNU.ANS | Bin 3953 -> 3859 bytes config/menu.hjson | 76 ++++++++++++-------- 2 files changed, 48 insertions(+), 28 deletions(-) diff --git a/art/themes/luciano_blocktronics/DOORMNU.ANS b/art/themes/luciano_blocktronics/DOORMNU.ANS index bcd28f390209baf3ae6ea09321286f828d64cccd..9621ec1d74d03dfffa28a31135e3ab86377de1d9 100644 GIT binary patch delta 271 zcmew;H(74OQ6?7YXcL3YKbRyLosG?N6{MpLt&I&pw6R&Pf~#MqyRV}{acMz8eo;xW zLT+MSr9ydPWwAnj8c>Nru5`4iGgu2yF_3RPIgq8uzyc{7hpaD?55XXQVWd?JBc7B0ENxnjIeqLH;dTCLrLUDd>s-ko>$cYBl Rn@!lnIhj`QP4?wi0RRF-QDp!C delta 365 zcmbO%_fc-cQ6^&r1?gx*Yh#04AZ=`xtB{kQoR}jWZIBBTHg^WgndK%W73XB;WkZC` zH=ksZWOM*(GS4*x3R#1+6=dcXD3m7_6$4E%2kA8g>CH6(X@QtrQk0mI3R0n9WME(< z9X(li3D3PwN?ptC@My7?NbI42Vu|K#_4DgfNpXLbMp diff --git a/config/menu.hjson b/config/menu.hjson index 3d651412..1c48ef63 100644 --- a/config/menu.hjson +++ b/config/menu.hjson @@ -1564,43 +1564,48 @@ value: { command: "Q" } action: @systemMethod:prevMenu } + // + // The system supports many ways of launching doors including + // modules for DoorParty!, BBSLink, etc. + // + // Below are some examples. See the documentation for more info. + // { - value: { command: "PW" } - action: @menu:doorPimpWars + value: { command: "ABRACADABRA" } + action: @menu:doorAbracadabraExample } { - value: { command: "TW" } - action: @menu:doorTradeWars2002BBSLink - } - { - value: { command: "DL" } - action: @menu:doorDarkLands + value: { command: "TWBBLINK" } + action: @menu:doorTradeWars2002BBSLinkExample } { value: { command: "DP" } - action: @menu:doorParty + action: @menu:doorPartyExample } { value: { command: "CN" } - action: @menu:combatNet + action: @menu:doorCombatNetExample } { - value: { command: "AGENT" } - action: @menu:telnetBridgeAgency + value: { command: "EXODUS" } + action: @menu:doorExodusCataclysm } ] } // - // Example using the abracadabra module for a retro DOS door + // Local Door Example via abracadabra module // - doorPimpWars: { - desc: Playing PimpWars + // This example assumes launch_door.sh (which is passed args) + // launches the door. + // + doorAbracadabraExample: { + desc: Abracadabra Example module: abracadabra config: { - name: PimpWars + name: Example Door dropFileType: DORINFO - cmd: /home/enigma/DOS/scripts/pimpwars.sh + cmd: /home/enigma/DOS/scripts/launch_door.sh args: [ "{node}", "{dropFile}", @@ -1613,11 +1618,11 @@ } // - // TradeWars 2000 example via BBSLink + // BBSLink Example (TradeWars 2000) // - // You will need to register with BBSLink to obtain sysCode, authCode and schemeCode + // Register @ https://bbslink.net/ // - doorTradeWars2002BBSLink: { + doorTradeWars2002BBSLinkExample: { desc: Playing TW 2002 (BBSLink) module: bbs_link config: { @@ -1628,8 +1633,12 @@ } } - // DoorParty! support. You'll need to register to obtain credentials - doorParty: { + // + // DoorParty! Example + // + // Register @ http://throwbackbbs.com/ + // + doorPartyExample: { desc: Using DoorParty! module: door_party config: { @@ -1639,8 +1648,12 @@ } } - // CombatNet support. You'll need to register at http://combatnet.us/ to obtain credentials - combatNet: { + // + // CombatNet Example + // + // Register @ http://combatnet.us/ + // + doorCombatNetExample: { desc: Using CombatNet module: combatnet config: { @@ -1649,11 +1662,18 @@ } } - telnetBridgeAgency: { - desc: Connected to HappyLand BBS - module: telnet_bridge + // + // Exodus Example (cataclysm) + // Register @ https://oddnetwork.org/exodus/ + // + doorExodusCataclysm: { + desc: Cataclysm + module: exodus config: { - host: agency.bbs.geek.nz + rejectUnauthorized: false + board: XXX + key: XXXXXXXX + door: cataclysm } }