* 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

@@ -10,28 +10,26 @@ const async = require('async');
const _ = require('lodash');
const SSHClient = require('ssh2').Client;
exports.getModule = DoorPartyModule;
exports.moduleInfo = {
name : 'DoorParty',
desc : 'DoorParty Access Module',
author : 'NuSkooler',
};
exports.getModule = class DoorPartyModule extends MenuModule {
constructor(options) {
super(options);
function DoorPartyModule(options) {
MenuModule.call(this, options);
// establish defaults
this.config = options.menuConfig.config;
this.config.host = this.config.host || 'dp.throwbackbbs.com';
this.config.sshPort = this.config.sshPort || 2022;
this.config.rloginPort = this.config.rloginPort || 513;
}
const self = this;
// establish defaults
this.config = options.menuConfig.config;
this.config.host = this.config.host || 'dp.throwbackbbs.com';
this.config.sshPort = this.config.sshPort || 2022;
this.config.rloginPort = this.config.rloginPort || 513;
this.initSequence = function() {
initSequence() {
let clientTerminated;
const self = this;
async.series(
[
@@ -125,8 +123,5 @@ function DoorPartyModule(options) {
}
}
);
};
}
require('util').inherits(DoorPartyModule, MenuModule);
}
};