Add {userName} and {userNameRaw} door launch/format options
This commit is contained in:
parent
ea3e0ac3ff
commit
5d91cfb7d0
|
@ -15,6 +15,8 @@ This document attempts to track **major** changes and additions in ENiGMA½. For
|
||||||
* The old concept of `autoScale` has been removed. See https://github.com/NuSkooler/enigma-bbs/issues/166
|
* The old concept of `autoScale` has been removed. See https://github.com/NuSkooler/enigma-bbs/issues/166
|
||||||
* Ability to delete from personal mailbox (finally!)
|
* Ability to delete from personal mailbox (finally!)
|
||||||
* Add ability to skip file and/or message areas during newscan. Set config.omitFileAreaTags and config.omitMessageAreaTags in new_scan configuration of your menu.hjson
|
* Add ability to skip file and/or message areas during newscan. Set config.omitFileAreaTags and config.omitMessageAreaTags in new_scan configuration of your menu.hjson
|
||||||
|
* `{userName}` (sanatized) and `{userNameRaw}` as well as `{cwd}` have been added to param options when launching a door.
|
||||||
|
|
||||||
|
|
||||||
## 0.0.8-alpha
|
## 0.0.8-alpha
|
||||||
* [Mystic BBS style](http://wiki.mysticbbs.com/doku.php?id=displaycodes) extended pipe color codes. These allow for example, to set "iCE" background colors.
|
* [Mystic BBS style](http://wiki.mysticbbs.com/doku.php?id=displaycodes) extended pipe color codes. These allow for example, to set "iCE" background colors.
|
||||||
|
|
|
@ -4,10 +4,12 @@
|
||||||
const stringFormat = require('./string_format.js');
|
const stringFormat = require('./string_format.js');
|
||||||
const { Errors } = require('./enig_error.js');
|
const { Errors } = require('./enig_error.js');
|
||||||
|
|
||||||
|
// deps
|
||||||
const pty = require('node-pty');
|
const pty = require('node-pty');
|
||||||
const decode = require('iconv-lite').decode;
|
const decode = require('iconv-lite').decode;
|
||||||
const createServer = require('net').createServer;
|
const createServer = require('net').createServer;
|
||||||
const paths = require('path');
|
const paths = require('path');
|
||||||
|
const sanatizeFilename = require('sanitize-filename');
|
||||||
|
|
||||||
module.exports = class Door {
|
module.exports = class Door {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -64,6 +66,8 @@ module.exports = class Door {
|
||||||
node : exeInfo.node.toString(),
|
node : exeInfo.node.toString(),
|
||||||
srvPort : this.sockServer ? this.sockServer.address().port.toString() : '-1',
|
srvPort : this.sockServer ? this.sockServer.address().port.toString() : '-1',
|
||||||
userId : this.client.user.userId.toString(),
|
userId : this.client.user.userId.toString(),
|
||||||
|
userName : sanatizeFilename(this.client.user.username),
|
||||||
|
userNameRaw : this.client.user.username,
|
||||||
cwd : cwd,
|
cwd : cwd,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue