diff --git a/core/config.js b/core/config.js index b53f98df..35cb0c92 100644 --- a/core/config.js +++ b/core/config.js @@ -82,6 +82,7 @@ function getDefaultConfig() { defaultGroups : [ 'users' ], // default groups new users belong to newUserNames : [ 'new', 'apply' ], // Names reserved for applying + badUserNames : [ 'sysop', 'admin', 'administrator', 'root' ], }, // :TODO: better name for "defaults"... which is redundant here! diff --git a/core/servers/telnet.js b/core/servers/telnet.js index b889e5bc..ffc99cf7 100644 --- a/core/servers/telnet.js +++ b/core/servers/telnet.js @@ -496,6 +496,12 @@ function TelnetClient(input, output) { self.log.debug(err); // :TODO: probably something better... self.emit('end'); }); + + this.connectionDebug = function(info, msg) { + if(Config.servers.telnet.debugConnections) { + self.log.trace(info, 'Telnet: ' + msg); + } + }; } util.inherits(TelnetClient, baseClient.Client); @@ -529,12 +535,12 @@ TelnetClient.prototype.handleWillCommand = function(evt) { this.requestNewEnvironment(); } else { // :TODO: temporary: - this.log.trace(evt, 'WILL'); + this.connectionDebug(evt, 'WILL'); } }; TelnetClient.prototype.handleWontCommand = function(evt) { - this.log.trace(evt, 'WONT'); + this.connectionDebug(evt, 'WONT'); }; TelnetClient.prototype.handleDoCommand = function(evt) { @@ -552,12 +558,12 @@ TelnetClient.prototype.handleDoCommand = function(evt) { this.wont.encrypt(); } else { // :TODO: temporary: - this.log.trace(evt, 'DO'); + this.connectionDebug(evt, 'DO'); } }; TelnetClient.prototype.handleDontCommand = function(evt) { - this.log.trace(evt, 'dont'); + this.connectionDebug(evt, 'dont'); }; /* diff --git a/mods/apply.js b/mods/apply.js index de6cdbf5..140489db 100644 --- a/mods/apply.js +++ b/mods/apply.js @@ -33,6 +33,12 @@ function validateApplicationData(formData, cb) { 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))) { cb('Invalid birthdate!', [ 3 ] ); return; diff --git a/mods/art/LOGIN1.ANS b/mods/art/WELCOME1.ANS similarity index 100% rename from mods/art/LOGIN1.ANS rename to mods/art/WELCOME1.ANS diff --git a/mods/menu.hjson b/mods/menu.hjson index 44012785..6697462f 100644 --- a/mods/menu.hjson +++ b/mods/menu.hjson @@ -482,7 +482,7 @@ fullLoginSequenceLoginArt: { desc: Logging In - art: LOGIN + art: WELCOME options: { pause: true } next: fullLoginSequenceLastCallers } diff --git a/mods/themes/luciano_blocktronics/theme.hjson b/mods/themes/luciano_blocktronics/theme.hjson index 041b6611..f191f7f4 100644 --- a/mods/themes/luciano_blocktronics/theme.hjson +++ b/mods/themes/luciano_blocktronics/theme.hjson @@ -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: { 0: { @@ -117,8 +135,8 @@ messageAreaMessageList: { config: { - listFormat: "|00|01|37{msgNum:>4} |00|37- |36{subj:<29.29} {from:<20.20} {ts} |01|31{newMark}" - focusListFormat: "|00|42|30{msgNum:>4} - {subj:<29.29} {from:<20.20} {ts} {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} {newIndicator}" dateTimeFormat: ddd MMM DDD } mci: {