From 6c99a070d315fff26a3b64c1aa3b089a7fe88bc5 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 12 Jun 2022 15:22:24 -0600 Subject: [PATCH] Minor cleanup --- UPGRADE.md | 3 ++- WHATSNEW.md | 2 +- core/bbs.js | 3 --- core/bbs_link.js | 2 +- core/client_term.js | 20 ++++++++++---------- core/config_loader.js | 2 +- docs/_docs/modding/wfc.md | 6 +++--- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 800e6fd2..f82367bb 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -34,7 +34,7 @@ Report your issue on Xibalba BBS, hop in #enigma-bbs on FreeNode and chat, or * All features and changes are backwards compatible. There are a few new configuration options in a new `term` section in the configuration. These are all optional, but include the following options in case you use them: ```hjson -{ +{ term: { // checkUtf8Encoding requires the use of cursor position reports, which are not supported on all terminals. @@ -54,6 +54,7 @@ Report your issue on Xibalba BBS, hop in #enigma-bbs on FreeNode and chat, or ``` In addition to these, there are also new options for `term.cp437TermList` and `term.utf8TermList`. Under most circumstances these should not need to be changed. If you want to customize these lists, more information is available in `config_default.js` +* To enable the new Waiting for Caller (WFC) support, please see [WFC](docs/modding/wfc.md). # 0.0.11-beta to 0.0.12-beta * Be aware that `master` is now mainline! This means all `git pull`'s will yield the latest version. See [WHATSNEW](WHATSNEW.md) for more information. diff --git a/WHATSNEW.md b/WHATSNEW.md index d89f1b7b..d58d28f8 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -5,8 +5,8 @@ This document attempts to track **major** changes and additions in ENiGMA½. For * **Note for contributors**: ENiGMA has switched to [Prettier](https://prettier.io) for formatting/style. Please see [CONTRIBUTING](CONTRIBUTING.md) and the Prettier website for more information. * Removed terminal `cursor position reports` from most locations in the code. This should greatly increase the number of terminal programs that work with Enigma 1/2. For more information, see [Issue #222](https://github.com/NuSkooler/enigma-bbs/issues/222). This may also resolve other issues, such as [Issue #365](https://github.com/NuSkooler/enigma-bbs/issues/365), and [Issue #320](https://github.com/NuSkooler/enigma-bbs/issues/320). Anyone that previously had terminal incompatibilities please re-check and let us know! * Bumped up the minimum [Node.js](https://nodejs.org/en/) version to v14. This will allow more expressive Javascript programming syntax with ECMAScript 2020 to improve the development experience. +* **New Waiting For Caller (WFC)** support via the `wfc.js` module. * Added new configuration options for `term.checkUtf8Encoding`, `term.checkAnsiHomePostion`, `term.cp437TermList`, and `term.utf8TermList`. More information on these options is available in [UPGRADE](UPGRADE.md). -* New Waiting For Caller (WFC) support via the `wfc.js` module. * Many new system statistics available via the StatLog such as current and average load, memory, etc. * Many new MCI codes: `MB`, `MF`, `LA`, `CL`, `UU`, `FT`, `DD`, `FB`, `DB`, `LC`, `LT`, `LD`, and more. See [MCI](./docs/art/mci.md). * SyncTERM style font support detection. diff --git a/core/bbs.js b/core/bbs.js index ddc6bfb5..211311cf 100644 --- a/core/bbs.js +++ b/core/bbs.js @@ -2,9 +2,6 @@ /* eslint-disable no-console */ 'use strict'; -//var SegfaultHandler = require('segfault-handler'); -//SegfaultHandler.registerHandler('enigma-bbs-segfault.log'); - // ENiGMA½ const conf = require('./config.js'); const logger = require('./logger.js'); diff --git a/core/bbs_link.js b/core/bbs_link.js index b5258123..17317435 100644 --- a/core/bbs_link.js +++ b/core/bbs_link.js @@ -129,7 +129,7 @@ exports.getModule = class BBSLinkModule extends MenuModule { '/auth.php?key=' + randomKey, headers, function resp(err, body) { - var status = body.trim(); + const status = body.trim(); if ('complete' === status) { return callback(null); diff --git a/core/client_term.js b/core/client_term.js index fa7f8ba2..4e78b96c 100644 --- a/core/client_term.js +++ b/core/client_term.js @@ -2,19 +2,19 @@ 'use strict'; // ENiGMA½ -var Log = require('./logger.js').log; -var renegadeToAnsi = require('./color_codes.js').renegadeToAnsi; +const Log = require('./logger.js').log; +const renegadeToAnsi = require('./color_codes.js').renegadeToAnsi; const Config = require('./config.js').get; -var iconv = require('iconv-lite'); -var assert = require('assert'); -var _ = require('lodash'); +const iconv = require('iconv-lite'); +const assert = require('assert'); +const _ = require('lodash'); exports.ClientTerminal = ClientTerminal; function ClientTerminal(output) { this.output = output; - var outputEncoding = 'cp437'; + let outputEncoding = 'cp437'; assert(iconv.encodingExists(outputEncoding)); // convert line feeds such as \n -> \r\n @@ -26,10 +26,10 @@ function ClientTerminal(output) { // Some terminal we handle specially // They can also be found in this.env{} // - var termType = 'unknown'; - var termHeight = 0; - var termWidth = 0; - var termClient = 'unknown'; + let termType = 'unknown'; + let termHeight = 0; + let termWidth = 0; + let termClient = 'unknown'; this.currentSyncFont = 'not_set'; diff --git a/core/config_loader.js b/core/config_loader.js index c84f0186..be14776f 100644 --- a/core/config_loader.js +++ b/core/config_loader.js @@ -69,7 +69,7 @@ module.exports = class ConfigLoader { defaultConfig, config, (defaultVal, configVal, key, target, source) => { - var path; + let path; while (true) { // eslint-disable-line no-constant-condition if (!stack.length) { diff --git a/docs/_docs/modding/wfc.md b/docs/_docs/modding/wfc.md index 1e6831df..d78a7b45 100644 --- a/docs/_docs/modding/wfc.md +++ b/docs/_docs/modding/wfc.md @@ -16,7 +16,7 @@ The system allows any user with the proper security to access the WFC / system o 3. User ID of 1 (root/admin) 4. The user belongs to the `wfc` group. -:information_source: Due to the above, the WFC screen is **disabled** by default as at a minimum, you'll need to add your user to the `wfc` group. +> :information_source: Due to the above, the WFC screen is **disabled** by default as at a minimum, you'll need to add your user to the `wfc` group. To change the ACS required, specify a alternative `acs` in the `config` block. For example: ```hjson @@ -28,7 +28,7 @@ mainMenuWaitingForCaller: { } ``` -:information_source: ENiGMA½ will enforce ACS of at least `SC` (secure connection) +> :notebook: ENiGMA½ will enforce ACS of at least `SC` (secure connection) ## Theming The following MCI codes are available: @@ -98,4 +98,4 @@ The following MCI codes are available: * `visIndicator`: Is the current user visible? Displayed via `statusVisibleIndicators` or system theme. See also [Themes](../art/themes.md). -:information_source: While [Standard MCI](../art/mci.md) codes work on any menu, they will **not** refresh. For values that may change over time, please use the custom format values above. \ No newline at end of file +> :information_source: While [Standard MCI](../art/mci.md) codes work on any menu, they will **not** refresh. For values that may change over time, please use the custom format values above. \ No newline at end of file