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
|
||||
* 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
|
||||
* `{userName}` (sanatized) and `{userNameRaw}` as well as `{cwd}` have been added to param options when launching a door.
|
||||
|
||||
|
||||
## 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.
|
||||
|
|
16
core/door.js
16
core/door.js
|
@ -1,13 +1,15 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
const stringFormat = require('./string_format.js');
|
||||
const { Errors } = require('./enig_error.js');
|
||||
const stringFormat = require('./string_format.js');
|
||||
const { Errors } = require('./enig_error.js');
|
||||
|
||||
const pty = require('node-pty');
|
||||
const decode = require('iconv-lite').decode;
|
||||
const createServer = require('net').createServer;
|
||||
const paths = require('path');
|
||||
// deps
|
||||
const pty = require('node-pty');
|
||||
const decode = require('iconv-lite').decode;
|
||||
const createServer = require('net').createServer;
|
||||
const paths = require('path');
|
||||
const sanatizeFilename = require('sanitize-filename');
|
||||
|
||||
module.exports = class Door {
|
||||
constructor(client) {
|
||||
|
@ -64,6 +66,8 @@ module.exports = class Door {
|
|||
node : exeInfo.node.toString(),
|
||||
srvPort : this.sockServer ? this.sockServer.address().port.toString() : '-1',
|
||||
userId : this.client.user.userId.toString(),
|
||||
userName : sanatizeFilename(this.client.user.username),
|
||||
userNameRaw : this.client.user.username,
|
||||
cwd : cwd,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue