Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs

This commit is contained in:
Bryan Ashby 2016-05-31 22:38:03 -06:00
commit 1a4b478a57
1 changed files with 10 additions and 4 deletions

View File

@ -30,7 +30,6 @@ function DoorPartyModule(options) {
this.config.sshPort = this.config.sshPort || 22;
this.config.rloginPort = this.config.rloginPort || 513;
this.initSequence = function() {
let clientTerminated;
@ -43,6 +42,9 @@ function DoorPartyModule(options) {
if(!_.isString(self.config.password)) {
return callback(new Error('Config requires "password"!'));
}
if(!_.isString(self.config.bbsTag)) {
return callback(new Error('Config requires "bbsTag"!'));
}
return callback(null);
},
function establishSecureConnection(callback) {
@ -74,8 +76,12 @@ function DoorPartyModule(options) {
return callback(new Error('Failed to establish tunnel'));
}
// send rlogin
const rlogin = `\x00${self.config.username}\x00${self.config.username}\x00${self.client.term.termType}\x00`;
//
// Send rlogin
// DoorParty wants the "server username" portion to be in the format of [BBS_TAG]USERNAME, e.g.
// [XA]nuskooler
//
const rlogin = `\x00${self.client.user.username}\x00[${self.config.bbsTag}]${self.client.user.username}\x00${self.client.term.termType}\x00`;
stream.write(rlogin);
pipedStream = stream; // :TODO: this is hacky...