mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-06 09:45:00 +02:00
Add {userName} and {userNameRaw} door launch/format options
This commit is contained in:
parent
ea3e0ac3ff
commit
5d91cfb7d0
2 changed files with 12 additions and 6 deletions
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…
Add table
Add a link
Reference in a new issue