Minor door updates
This commit is contained in:
parent
0e2593bd1c
commit
ecb0cd8941
|
@ -9,9 +9,11 @@ const ansi = require('./ansi_term.js');
|
|||
const Events = require('./events.js');
|
||||
const { Errors } = require('./enig_error.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
const assert = require('assert');
|
||||
const _ = require('lodash');
|
||||
const paths = require('path');
|
||||
|
||||
const activeDoorNodeInstances = {};
|
||||
|
||||
|
@ -153,7 +155,7 @@ exports.getModule = class AbracadabraModule extends MenuModule {
|
|||
|
||||
const exeInfo = {
|
||||
cmd : this.config.cmd,
|
||||
cwd : this.config.cwd, // null/undefined = parent_of(cmd)
|
||||
cwd : this.config.cwd || paths.dirname(this.config.cmd),
|
||||
args : this.config.args,
|
||||
io : this.config.io || 'stdio',
|
||||
encoding : this.config.encoding || 'cp437',
|
||||
|
|
24
core/door.js
24
core/door.js
|
@ -71,13 +71,23 @@ module.exports = class Door {
|
|||
|
||||
const args = exeInfo.args.map( arg => stringFormat(arg, formatObj) );
|
||||
|
||||
const door = pty.spawn(exeInfo.cmd, args, {
|
||||
cols : this.client.term.termWidth,
|
||||
rows : this.client.term.termHeight,
|
||||
cwd : cwd,
|
||||
env : exeInfo.env,
|
||||
encoding : null, // we want to handle all encoding ourself
|
||||
});
|
||||
this.client.log.debug(
|
||||
{ cmd : exeInfo.cmd, args, io : this.io },
|
||||
'Executing door'
|
||||
);
|
||||
|
||||
let door;
|
||||
try {
|
||||
door = pty.spawn(exeInfo.cmd, args, {
|
||||
cols : this.client.term.termWidth,
|
||||
rows : this.client.term.termHeight,
|
||||
cwd : cwd,
|
||||
env : exeInfo.env,
|
||||
encoding : null, // we want to handle all encoding ourself
|
||||
});
|
||||
} catch(e) {
|
||||
return cb(e);
|
||||
}
|
||||
|
||||
if('stdio' === this.io) {
|
||||
this.client.log.debug('Using stdio for door I/O');
|
||||
|
|
|
@ -16,6 +16,7 @@ const { mkdirs } = require('fs-extra');
|
|||
|
||||
//
|
||||
// Resources
|
||||
// * https://github.com/NuSkooler/ansi-bbs/tree/master/docs/dropfile_formats
|
||||
// * http://goldfndr.home.mindspring.com/dropfile/
|
||||
// * https://en.wikipedia.org/wiki/Talk%3ADropfile
|
||||
// * http://thoughtproject.com/libraries/bbs/Sysop/Doors/DropFiles/index.htm
|
||||
|
@ -36,7 +37,7 @@ module.exports = class DropFile {
|
|||
get fileName() {
|
||||
return {
|
||||
DOOR : 'DOOR.SYS', // GAP BBS, many others
|
||||
DOOR32 : 'DOOR32.SYS', // EleBBS / Mystic, Syncronet, Maximus, Telegard, AdeptXBBS, ...
|
||||
DOOR32 : 'door32.sys', // Mystic, EleBBS, Syncronet, Maximus, Telegard, AdeptXBBS (lowercase name as per spec)
|
||||
CALLINFO : 'CALLINFO.BBS', // Citadel?
|
||||
DORINFO : this.getDoorInfoFileName(), // RBBS, RemoteAccess, QBBS, ...
|
||||
CHAIN : 'CHAIN.TXT', // WWIV
|
||||
|
@ -155,6 +156,7 @@ module.exports = class DropFile {
|
|||
//
|
||||
// Resources:
|
||||
// * http://wiki.bbses.info/index.php/DOOR32.SYS
|
||||
// * https://github.com/NuSkooler/ansi-bbs/blob/master/docs/dropfile_formats/door32_sys.txt
|
||||
//
|
||||
// :TODO: local/serial/telnet need to be configurable -- which also changes socket handle!
|
||||
const Door32CommTypes = {
|
||||
|
|
Loading…
Reference in New Issue