* Convert MenuModule to ES6 style class

* Convert modules that are MenuModule subclasses to ES6 style classes
* Convert mixins to ES6 style
* Various cleanup
This commit is contained in:
Bryan Ashby 2017-01-25 22:18:05 -07:00
parent 1c03c3021a
commit 99ab60bf77
26 changed files with 2214 additions and 2418 deletions

View file

@ -27,9 +27,6 @@ const buffers = require('buffers');
*/
// :TODO: ENH: Support nodeMax and tooManyArt
exports.getModule = TelnetBridgeModule;
exports.moduleInfo = {
name : 'Telnet Bridge',
desc : 'Connect to other Telnet Systems',
@ -123,18 +120,18 @@ class TelnetClientConnection extends EventEmitter {
}
exports.getModule = class TelnetBridgeModule extends MenuModule {
constructor(options) {
super(options);
function TelnetBridgeModule(options) {
MenuModule.call(this, options);
const self = this;
this.config = options.menuConfig.config;
this.config = options.menuConfig.config;
// defaults
this.config.port = this.config.port || 23;
}
// defaults
this.config.port = this.config.port || 23;
this.initSequence = function() {
initSequence() {
let clientTerminated;
const self = this;
async.series(
[
@ -195,7 +192,5 @@ function TelnetBridgeModule(options) {
}
}
);
};
}
require('util').inherits(TelnetBridgeModule, MenuModule);
}
};