* Fix 'newMark' -> 'newIndicator' in message list

* Better Telnet trace filter similar to SSH
This commit is contained in:
Bryan Ashby 2015-10-22 13:01:16 -06:00
parent e9836e18db
commit 4988559569
6 changed files with 38 additions and 7 deletions

View File

@ -82,6 +82,7 @@ function getDefaultConfig() {
defaultGroups : [ 'users' ], // default groups new users belong to defaultGroups : [ 'users' ], // default groups new users belong to
newUserNames : [ 'new', 'apply' ], // Names reserved for applying newUserNames : [ 'new', 'apply' ], // Names reserved for applying
badUserNames : [ 'sysop', 'admin', 'administrator', 'root' ],
}, },
// :TODO: better name for "defaults"... which is redundant here! // :TODO: better name for "defaults"... which is redundant here!

View File

@ -496,6 +496,12 @@ function TelnetClient(input, output) {
self.log.debug(err); // :TODO: probably something better... self.log.debug(err); // :TODO: probably something better...
self.emit('end'); self.emit('end');
}); });
this.connectionDebug = function(info, msg) {
if(Config.servers.telnet.debugConnections) {
self.log.trace(info, 'Telnet: ' + msg);
}
};
} }
util.inherits(TelnetClient, baseClient.Client); util.inherits(TelnetClient, baseClient.Client);
@ -529,12 +535,12 @@ TelnetClient.prototype.handleWillCommand = function(evt) {
this.requestNewEnvironment(); this.requestNewEnvironment();
} else { } else {
// :TODO: temporary: // :TODO: temporary:
this.log.trace(evt, 'WILL'); this.connectionDebug(evt, 'WILL');
} }
}; };
TelnetClient.prototype.handleWontCommand = function(evt) { TelnetClient.prototype.handleWontCommand = function(evt) {
this.log.trace(evt, 'WONT'); this.connectionDebug(evt, 'WONT');
}; };
TelnetClient.prototype.handleDoCommand = function(evt) { TelnetClient.prototype.handleDoCommand = function(evt) {
@ -552,12 +558,12 @@ TelnetClient.prototype.handleDoCommand = function(evt) {
this.wont.encrypt(); this.wont.encrypt();
} else { } else {
// :TODO: temporary: // :TODO: temporary:
this.log.trace(evt, 'DO'); this.connectionDebug(evt, 'DO');
} }
}; };
TelnetClient.prototype.handleDontCommand = function(evt) { TelnetClient.prototype.handleDontCommand = function(evt) {
this.log.trace(evt, 'dont'); this.connectionDebug(evt, 'dont');
}; };
/* /*

View File

@ -33,6 +33,12 @@ function validateApplicationData(formData, cb) {
return; return;
} }
var invalidNames = Config.users.newUserNames + Config.users.badUserNames;
if(invalidNames.indexOf(formData.value.username.toLowerCase()) > -1) {
cb('Handle is blacklisted!', [ 1 ] );
return;
}
if(isNaN(Date.parse(formData.value.birthdate))) { if(isNaN(Date.parse(formData.value.birthdate))) {
cb('Invalid birthdate!', [ 3 ] ); cb('Invalid birthdate!', [ 3 ] );
return; return;

View File

@ -482,7 +482,7 @@
fullLoginSequenceLoginArt: { fullLoginSequenceLoginArt: {
desc: Logging In desc: Logging In
art: LOGIN art: WELCOME
options: { pause: true } options: { pause: true }
next: fullLoginSequenceLastCallers next: fullLoginSequenceLastCallers
} }

View File

@ -43,6 +43,24 @@
} }
} }
} }
newUserApplicationSsh: {
mci: {
ET1: { width: 23 }
ET2: { width: 23 }
ET5: { width: 23 }
ET6: { width: 23 }
ET7: { width: 23 }
ET8: { width: 23 }
ET9: { width: 23 }
ET10: { width: 23 }
TM12: {
focusTextStyle: first lower
}
}
}
newUserFeedbackToSysOp: { newUserFeedbackToSysOp: {
0: { 0: {
@ -117,8 +135,8 @@
messageAreaMessageList: { messageAreaMessageList: {
config: { config: {
listFormat: "|00|01|37{msgNum:>4} |00|37- |36{subj:<29.29} {from:<20.20} {ts} |01|31{newMark}" listFormat: "|00|01|37{msgNum:>4} |00|37- |36{subj:<29.29} {from:<20.20} {ts} |01|31{newIndicator}"
focusListFormat: "|00|42|30{msgNum:>4} - {subj:<29.29} {from:<20.20} {ts} {newMark}" focusListFormat: "|00|42|30{msgNum:>4} - {subj:<29.29} {from:<20.20} {ts} {newIndicator}"
dateTimeFormat: ddd MMM DDD dateTimeFormat: ddd MMM DDD
} }
mci: { mci: {