mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
Fix Node.js 10 deprecation warnings
This commit is contained in:
parent
476e8f2f0c
commit
f16eb6f3e6
12 changed files with 42 additions and 41 deletions
|
@ -374,7 +374,7 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
|||
// needed for things like sz/rz
|
||||
if(external.escapeTelnet) {
|
||||
const tmp = data.toString('binary').replace(/\xff{2}/g, '\xff'); // de-escape
|
||||
externalProc.write(new Buffer(tmp, 'binary'));
|
||||
externalProc.write(Buffer.from(tmp, 'binary'));
|
||||
} else {
|
||||
externalProc.write(data);
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
|||
// needed for things like sz/rz
|
||||
if(external.escapeTelnet) {
|
||||
const tmp = data.toString('binary').replace(/\xff/g, '\xff\xff'); // escape
|
||||
this.client.term.rawWrite(new Buffer(tmp, 'binary'));
|
||||
this.client.term.rawWrite(Buffer.from(tmp, 'binary'));
|
||||
} else {
|
||||
this.client.term.rawWrite(data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue