mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-26 04:28:17 +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
|
@ -33,7 +33,7 @@ exports.moduleInfo = {
|
|||
author : 'Andrew Pamment',
|
||||
};
|
||||
|
||||
const IAC_DO_TERM_TYPE = new Buffer( [ 255, 253, 24 ] );
|
||||
const IAC_DO_TERM_TYPE = Buffer.from( [ 255, 253, 24 ] );
|
||||
|
||||
class TelnetClientConnection extends EventEmitter {
|
||||
constructor(client) {
|
||||
|
@ -103,7 +103,7 @@ class TelnetClientConnection extends EventEmitter {
|
|||
//
|
||||
let bufs = buffers();
|
||||
|
||||
bufs.push(new Buffer(
|
||||
bufs.push(Buffer.from(
|
||||
[
|
||||
255, // IAC
|
||||
250, // SB
|
||||
|
@ -113,8 +113,8 @@ class TelnetClientConnection extends EventEmitter {
|
|||
));
|
||||
|
||||
bufs.push(
|
||||
new Buffer(this.client.term.termType), // e.g. "ansi"
|
||||
new Buffer( [ 255, 240 ] ) // IAC, SE
|
||||
Buffer.from(this.client.term.termType), // e.g. "ansi"
|
||||
Buffer.from( [ 255, 240 ] ) // IAC, SE
|
||||
);
|
||||
|
||||
return bufs.toBuffer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue