Code cleanup & resolve some minor TODO's in dropfile gen

This commit is contained in:
Bryan Ashby 2018-12-09 01:01:55 -07:00
parent a8604ece54
commit 8652b35b46
3 changed files with 30 additions and 22 deletions

View file

@ -9,7 +9,6 @@ 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,7 +63,7 @@ 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) || `user${this.client.user.userId.toString()}`,
userName : this.client.user.getSanitizedName(),
userNameRaw : this.client.user.username,
cwd : cwd,
};