* Add font support

* Default to port 23
This commit is contained in:
Bryan Ashby 2016-07-19 20:58:25 -06:00
parent df56391338
commit 4346b44ae8
1 changed files with 10 additions and 2 deletions

View File

@ -2,8 +2,9 @@
'use strict';
// ENiGMA½
const MenuModule = require('../core/menu_module.js').MenuModule;
const resetScreen = require('../core/ansi_term.js').resetScreen;
const MenuModule = require('../core/menu_module.js').MenuModule;
const resetScreen = require('../core/ansi_term.js').resetScreen;
const setSyncTermFontWithAlias = require('../core/ansi_term.js').setSyncTermFontWithAlias;
// deps
const async = require('async');
@ -125,6 +126,9 @@ function TelnetBridgeModule(options) {
const self = this;
this.config = options.menuConfig.config;
// defaults
this.config.port = this.config.port || 23;
this.initSequence = function() {
let clientTerminated;
@ -156,6 +160,10 @@ function TelnetBridgeModule(options) {
telnetConnection.on('connected', () => {
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.log.info('Connection ended. Terminating connection');
clientTerminated = true;