From 30f965d981e0356461951a70481725368cc76fd4 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 16 Jan 2023 11:04:56 -0700 Subject: [PATCH] Remove no longer supported CombatNet --- README.md | 2 +- WHATSNEW.md | 1 + core/combatnet.js | 136 ----------------------------- core/goldmine.js | 2 +- docs/_docs/modding/door-servers.md | 17 ---- docs/index.md | 2 +- misc/menu_templates/doors.in.hjson | 18 ---- 7 files changed, 4 insertions(+), 174 deletions(-) delete mode 100644 core/combatnet.js diff --git a/README.md b/README.md index 0254eb73..da8dcf38 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Below are just some of the features ENiGMA½ supports out of the box: * [SQLite](http://sqlite.org/) storage of users, message areas, etc. * Strong [PBKDF2](https://en.wikipedia.org/wiki/PBKDF2) backed password encryption. * Support for **2-Factor Authentication** with One-Time-Passwords - * [Door support](./docs/_docs/modding/door-servers.md) including common dropfile formats for legacy DOS doors. Built in [BBSLink](http://bbslink.net/), [DoorParty](http://forums.throwbackbbs.com/), [Exodus](https://oddnetwork.org/exodus/) and [CombatNet](http://combatnet.us/) support! + * [Door support](./docs/_docs/modding/door-servers.md) including common dropfile formats for legacy DOS doors. Built in [BBSLink](http://bbslink.net/), [DoorParty](http://forums.throwbackbbs.com/), and [Exodus](https://oddnetwork.org/exodus/)! * Structured [Bunyan](https://github.com/trentm/node-bunyan) logging! * [Message networks](./docs/_docs/messageareas/message-networks.md) with FidoNet Type Network (FTN) + BinkleyTerm Style Outbound (BSO) message import/export. Messages Bases can also be exposed via [Gopher](./docs/_docs/servers/contentservers/gopher.md), or [NNTP](./docs/_docs/servers/contentservers/nntp.md)! * [Gazelle](https://github.com/WhatCD/Gazelle) inspired File Bases including fast fully indexed full text search (FTS), #tags, and HTTP(S) temporary download URLs using a built in [web server](./docs/_docs/servers/contentservers/web-server.md). Legacy X/Y/Z modem also supported! diff --git a/WHATSNEW.md b/WHATSNEW.md index f91313a6..708653f0 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -7,6 +7,7 @@ This document attempts to track **major** changes and additions in ENiGMA½. For * Some internal routes such as those used for password resets live within `/_internal/`. * Routes for the file base now default to `/_f/` prefixed instead of just `/f/`. If `/f/` is in your `config.hjson` you are encouraged to update it! * Finally, the system will search for `index.html` and `index.htm` in that order, if another suitable route cannot be established. +* CombatNet has shut down, so the module (`combatnet.js`) has been removed. ## 0.0.13-beta * **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. diff --git a/core/combatnet.js b/core/combatnet.js deleted file mode 100644 index b85a9669..00000000 --- a/core/combatnet.js +++ /dev/null @@ -1,136 +0,0 @@ -/* jslint node: true */ -'use strict'; - -// enigma-bbs -const { MenuModule } = require('../core/menu_module.js'); -const { resetScreen } = require('../core/ansi_term.js'); -const { Errors } = require('./enig_error.js'); -const { trackDoorRunBegin, trackDoorRunEnd } = require('./door_util.js'); - -// deps -const async = require('async'); -const RLogin = require('rlogin'); - -exports.moduleInfo = { - name: 'CombatNet', - desc: 'CombatNet Access Module', - author: 'Dave Stephens', -}; - -exports.getModule = class CombatNetModule extends MenuModule { - constructor(options) { - super(options); - - // establish defaults - this.config = options.menuConfig.config; - this.config.host = this.config.host || 'bbs.combatnet.us'; - this.config.rloginPort = this.config.rloginPort || 4513; - } - - initSequence() { - const self = this; - - async.series( - [ - function validateConfig(callback) { - return self.validateConfigFields( - { - host: 'string', - password: 'string', - bbsTag: 'string', - rloginPort: 'number', - }, - callback - ); - }, - function establishRloginConnection(callback) { - self.client.term.write(resetScreen()); - self.client.term.write('Connecting to CombatNet, please wait...\n'); - - let doorTracking; - - const restorePipeToNormal = function () { - if (self.client.term.output) { - self.client.term.output.removeListener( - 'data', - sendToRloginBuffer - ); - - if (doorTracking) { - trackDoorRunEnd(doorTracking); - } - } - }; - - const rlogin = new RLogin({ - clientUsername: self.config.password, - serverUsername: `${self.config.bbsTag}${self.client.user.username}`, - host: self.config.host, - port: self.config.rloginPort, - terminalType: self.client.term.termClient, - terminalSpeed: 57600, - }); - - // If there was an error ... - rlogin.on('error', err => { - self.client.log.info( - `CombatNet rlogin client error: ${err.message}` - ); - restorePipeToNormal(); - return callback(err); - }); - - // If we've been disconnected ... - rlogin.on('disconnect', () => { - self.client.log.info('Disconnected from CombatNet'); - restorePipeToNormal(); - return callback(null); - }); - - function sendToRloginBuffer(buffer) { - rlogin.send(buffer); - } - - rlogin.on( - 'connect', - /* The 'connect' event handler will be supplied with one argument, - a boolean indicating whether or not the connection was established. */ - - function (state) { - if (state) { - self.client.log.info('Connected to CombatNet'); - self.client.term.output.on('data', sendToRloginBuffer); - - doorTracking = trackDoorRunBegin(self.client); - } else { - return callback( - Errors.General( - 'Failed to establish establish CombatNet connection' - ) - ); - } - } - ); - - // If data (a Buffer) has been received from the server ... - rlogin.on('data', data => { - self.client.term.rawWrite(data); - }); - - // connect... - rlogin.connect(); - - // note: no explicit callback() until we're finished! - }, - ], - err => { - if (err) { - self.client.log.warn({ error: err.message }, 'CombatNet error'); - } - - // if the client is still here, go to previous - self.prevMenu(); - } - ); - } -}; diff --git a/core/goldmine.js b/core/goldmine.js index 7959f6a9..f086616e 100644 --- a/core/goldmine.js +++ b/core/goldmine.js @@ -115,7 +115,7 @@ exports.getModule = class GoldmineModule extends MenuModule { ); } - this.client.log.info('Connected to CombatNet'); + this.client.log.info('Connected to gOLD mINE'); this.client.term.output.on('data', rloginSend); doorTracking = trackDoorRunBegin(this.client); diff --git a/docs/_docs/modding/door-servers.md b/docs/_docs/modding/door-servers.md index 5deaf89b..25cbd53e 100644 --- a/docs/_docs/modding/door-servers.md +++ b/docs/_docs/modding/door-servers.md @@ -40,22 +40,5 @@ doorParty: { Fill in `username`, `password`, and `bbsTag` with credentials provided to you and you should be in business! -## The CombatNet Module -The `combatnet` module provides native support for [CombatNet](http://combatnet.us/). Add the following to your menu config: - -````hjson -combatNet: { - desc: Using CombatNet - module: combatnet - config: { - bbsTag: CBNxxx - password: XXXXXXXXX - } -} -```` -Update `bbsTag` (in the format CBNxxx) and `password` with the details provided when you register, then -you should be ready to rock! - ## The Exodus Module - TBC \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 676a2be0..9cf5182c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,7 +21,7 @@ ENiGMA½ is a modern BBS software with a nostalgic flair! * [SQLite](http://sqlite.org/) storage of users, message areas, etc. * Strong [PBKDF2](https://en.wikipedia.org/wiki/PBKDF2) backed password encryption. * Support for 2-Factor Authentication with One-Time-Passwords - * [Door support](_docs/modding/door-servers.md) including common dropfile formats for legacy DOS doors. Built in [BBSLink](http://bbslink.net/), [DoorParty](http://forums.throwbackbbs.com/), [Exodus](https://oddnetwork.org/exodus/) and [CombatNet](http://combatnet.us/) support! + * [Door support](_docs/modding/door-servers.md) including common dropfile formats for legacy DOS doors. Built in [BBSLink](http://bbslink.net/), [DoorParty](http://forums.throwbackbbs.com/), and [Exodus](https://oddnetwork.org/exodus/)! * [Bunyan](https://github.com/trentm/node-bunyan) logging! * [Message networks](_docs/messageareas/message-networks.md) with FidoNet Type Network (FTN) + BinkleyTerm Style Outbound (BSO) message import/export. Messages Bases can also be exposed via [Gopher](_docs/servers/contentservers/gopher.md), or [NNTP](_docs/servers/contentservers/nntp.md)! * [Gazelle](https://github.com/WhatCD/Gazelle) inspired File Bases including fast fully indexed full text search (FTS), #tags, and HTTP(S) temporary download URLs using a built in [web server](_docs/servers/contentservers/web-server.md). Legacy X/Y/Z modem also supported! diff --git a/misc/menu_templates/doors.in.hjson b/misc/menu_templates/doors.in.hjson index c26ee114..16e39e0b 100644 --- a/misc/menu_templates/doors.in.hjson +++ b/misc/menu_templates/doors.in.hjson @@ -34,10 +34,6 @@ value: { command: "DP" } action: @menu:doorPartyExample } - { - value: { command: "CN" } - action: @menu:doorCombatNetExample - } { value: { command: "EXODUS" } action: @menu:doorExodusCataclysm @@ -100,20 +96,6 @@ } } - // - // CombatNet Example - // - // Register @ http://combatnet.us/ - // - doorCombatNetExample: { - desc: Using CombatNet - module: combatnet - config: { - bbsTag: CBNxxx - password: XXXXXXXXX - } - } - // // Exodus Example (cataclysm) // Register @ https://oddnetwork.org/exodus/