mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 20:18:25 +02:00
Proceed telnet login even if term type is not received [right away]; Allows older DOS terms to function
This commit is contained in:
parent
617f0ef07e
commit
7af30ea112
1 changed files with 20 additions and 4 deletions
|
@ -541,6 +541,13 @@ function TelnetClient(input, output) {
|
||||||
const logger = self.log || Log;
|
const logger = self.log || Log;
|
||||||
return logger.warn(info, `Telnet: ${msg}`);
|
return logger.warn(info, `Telnet: ${msg}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.readyNow = () => {
|
||||||
|
if(!this.didReady) {
|
||||||
|
this.didReady = true;
|
||||||
|
this.emit('ready', { firstMenu : Config.loginServers.telnet.firstMenu } );
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
util.inherits(TelnetClient, baseClient.Client);
|
util.inherits(TelnetClient, baseClient.Client);
|
||||||
|
@ -633,10 +640,7 @@ TelnetClient.prototype.handleSbCommand = function(evt) {
|
||||||
|
|
||||||
self.negotiationsComplete = true; // :TODO: throw in a array of what we've taken care. Complete = array satisified or timeout
|
self.negotiationsComplete = true; // :TODO: throw in a array of what we've taken care. Complete = array satisified or timeout
|
||||||
|
|
||||||
if(!self.didReady) {
|
self.readyNow();
|
||||||
self.didReady = true;
|
|
||||||
self.emit('ready', { firstMenu : Config.loginServers.telnet.firstMenu } );
|
|
||||||
}
|
|
||||||
} else if('new environment' === evt.option) {
|
} else if('new environment' === evt.option) {
|
||||||
//
|
//
|
||||||
// Handling is as follows:
|
// Handling is as follows:
|
||||||
|
@ -832,6 +836,18 @@ exports.getModule = class TelnetServerModule extends LoginServerModule {
|
||||||
client.banner();
|
client.banner();
|
||||||
|
|
||||||
this.handleNewClient(client, sock, ModuleInfo);
|
this.handleNewClient(client, sock, ModuleInfo);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Set a timeout and attempt to proceed even if we don't know
|
||||||
|
// the term type yet, which is the preferred trigger
|
||||||
|
// for moving along
|
||||||
|
//
|
||||||
|
setTimeout( () => {
|
||||||
|
if(!client.didReady) {
|
||||||
|
Log.info('Proceeding after 3s without knowing term type');
|
||||||
|
client.readyNow();
|
||||||
|
}
|
||||||
|
}, 3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.server.on('error', err => {
|
this.server.on('error', err => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue