mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
* WIP Menu system vs raw module access
This commit is contained in:
parent
f7462bbbdd
commit
efcc8756ba
8 changed files with 153 additions and 32 deletions
|
@ -2,12 +2,14 @@
|
|||
'use strict';
|
||||
|
||||
// ENiGMA½
|
||||
var conf = require('../config.js');
|
||||
var baseClient = require('../client.js');
|
||||
var user = require('../user.js');
|
||||
var conf = require('../config.js');
|
||||
var baseClient = require('../client.js');
|
||||
var user = require('../user.js');
|
||||
var ServerModule = require('../server_module.js').ServerModule;
|
||||
|
||||
var ssh2 = require('ssh2');
|
||||
var fs = require('fs');
|
||||
var util = require('util');
|
||||
|
||||
exports.moduleInfo = {
|
||||
name : 'SSH',
|
||||
|
@ -15,7 +17,7 @@ exports.moduleInfo = {
|
|||
author : 'NuSkooler'
|
||||
};
|
||||
|
||||
exports.createServer = createServer;
|
||||
exports.getModule = SSHServerModule;
|
||||
|
||||
function SSHClient(input, output) {
|
||||
baseClient.Client.apply(this, arguments);
|
||||
|
@ -65,9 +67,17 @@ function SSHClient(input, output) {
|
|||
});
|
||||
}
|
||||
|
||||
require('util').inherits(SSHClient, baseClient.Client);
|
||||
util.inherits(SSHClient, baseClient.Client);
|
||||
|
||||
function SSHServerModule() {
|
||||
ServerModule.call(this);
|
||||
}
|
||||
|
||||
util.inherits(SSHServerModule, ServerModule);
|
||||
|
||||
SSHServerModule.prototype.createServer = function() {
|
||||
SSHServerModule.super_.prototype.createServer.call(this);
|
||||
|
||||
function createServer() {
|
||||
// :TODO: setup all options here. What should the banner, etc. really be????
|
||||
var serverConf = {
|
||||
privateKey : fs.readFileSync(conf.config.servers.ssh.rsaPrivateKey),
|
||||
|
@ -83,4 +93,4 @@ function createServer() {
|
|||
});
|
||||
|
||||
return server;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue