* Better place to get server name/type
* Servers export 'isSecure'
This commit is contained in:
parent
ad4eea6ba7
commit
12e7722ec9
|
@ -193,7 +193,8 @@ function startListening() {
|
|||
client.session = {};
|
||||
}
|
||||
|
||||
client.session.serverType = moduleInst.getServerType();
|
||||
client.session.serverName = module.moduleInfo.name;
|
||||
client.session.isSecure = module.moduleInfo.isSecure || false;
|
||||
|
||||
clientConns.addNewClient(client, clientSock);
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ function addNewClient(client, clientSock) {
|
|||
|
||||
var connInfo = {
|
||||
ip : clientSock.remoteAddress,
|
||||
serverType : client.session.serverType,
|
||||
serverName : client.session.serverName,
|
||||
isSecure : client.session.isSecure,
|
||||
};
|
||||
|
||||
if(client.log.debug()) {
|
||||
|
|
|
@ -54,7 +54,7 @@ function getPredefinedMCIValue(client, code) {
|
|||
UC : function loginCount() { return client.user.properties.login_count.toString(); },
|
||||
ND : function connectedNode() { return client.node.toString(); },
|
||||
IP : function clientIpAddress() { return client.address().address; },
|
||||
ST : function serverType() { return client.session.serverType; },
|
||||
ST : function serverName() { return client.session.serverName; },
|
||||
|
||||
MS : function accountCreated() { return moment(client.user.properties.account_created).format(client.currentTheme.helpers.getDateFormat()); },
|
||||
CS : function currentStatus() { return client.currentStatus; },
|
||||
|
|
|
@ -13,6 +13,3 @@ require('util').inherits(ServerModule, PluginModule);
|
|||
|
||||
ServerModule.prototype.createServer = function() {
|
||||
};
|
||||
|
||||
ServerModule.prototype.getServerType = function() {
|
||||
};
|
||||
|
|
|
@ -16,9 +16,10 @@ var _ = require('lodash');
|
|||
var assert = require('assert');
|
||||
|
||||
exports.moduleInfo = {
|
||||
name : 'SSH',
|
||||
desc : 'SSH Server',
|
||||
author : 'NuSkooler'
|
||||
name : 'SSH',
|
||||
desc : 'SSH Server',
|
||||
author : 'NuSkooler',
|
||||
isSecure : true,
|
||||
};
|
||||
|
||||
exports.getModule = SSHServerModule;
|
||||
|
@ -232,7 +233,3 @@ SSHServerModule.prototype.createServer = function() {
|
|||
|
||||
return server;
|
||||
};
|
||||
|
||||
SSHServerModule.prototype.getServerType = function() {
|
||||
return 'SSH';
|
||||
};
|
|
@ -16,9 +16,10 @@ var util = require('util');
|
|||
//var debug = require('debug')('telnet');
|
||||
|
||||
exports.moduleInfo = {
|
||||
name : 'Telnet',
|
||||
desc : 'Telnet Server',
|
||||
author : 'NuSkooler'
|
||||
name : 'Telnet',
|
||||
desc : 'Telnet Server',
|
||||
author : 'NuSkooler',
|
||||
isSecure : false,
|
||||
};
|
||||
|
||||
exports.getModule = TelnetServerModule;
|
||||
|
@ -785,7 +786,3 @@ TelnetServerModule.prototype.createServer = function() {
|
|||
|
||||
return server;
|
||||
};
|
||||
|
||||
TelnetServerModule.prototype.getServerType = function() {
|
||||
return 'TELNET';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue