parent
df56391338
commit
4346b44ae8
|
@ -2,8 +2,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// ENiGMA½
|
// ENiGMA½
|
||||||
const MenuModule = require('../core/menu_module.js').MenuModule;
|
const MenuModule = require('../core/menu_module.js').MenuModule;
|
||||||
const resetScreen = require('../core/ansi_term.js').resetScreen;
|
const resetScreen = require('../core/ansi_term.js').resetScreen;
|
||||||
|
const setSyncTermFontWithAlias = require('../core/ansi_term.js').setSyncTermFontWithAlias;
|
||||||
|
|
||||||
// deps
|
// deps
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
|
@ -125,6 +126,9 @@ function TelnetBridgeModule(options) {
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
this.config = options.menuConfig.config;
|
this.config = options.menuConfig.config;
|
||||||
|
|
||||||
|
// defaults
|
||||||
|
this.config.port = this.config.port || 23;
|
||||||
|
|
||||||
this.initSequence = function() {
|
this.initSequence = function() {
|
||||||
let clientTerminated;
|
let clientTerminated;
|
||||||
|
@ -156,6 +160,10 @@ function TelnetBridgeModule(options) {
|
||||||
telnetConnection.on('connected', () => {
|
telnetConnection.on('connected', () => {
|
||||||
self.client.log.info(connectOpts, 'Telnet bridge connection established');
|
self.client.log.info(connectOpts, 'Telnet bridge connection established');
|
||||||
|
|
||||||
|
if(self.config.font) {
|
||||||
|
self.client.term.rawWrite(setSyncTermFontWithAlias(self.config.font));
|
||||||
|
}
|
||||||
|
|
||||||
self.client.once('end', () => {
|
self.client.once('end', () => {
|
||||||
self.client.log.info('Connection ended. Terminating connection');
|
self.client.log.info('Connection ended. Terminating connection');
|
||||||
clientTerminated = true;
|
clientTerminated = true;
|
||||||
|
|
Loading…
Reference in New Issue