Add support for useListForSize

This commit is contained in:
Thomas Smyth 2020-10-22 18:18:44 +01:00
parent 72c3419b9f
commit 58ffc88085
4 changed files with 11 additions and 6 deletions

View File

@ -5,12 +5,13 @@
"queryPort": 27165, "queryPort": 27165,
"rconPort": 21114, "rconPort": 21114,
"rconPassword": "password", "rconPassword": "password",
"rconVerbose": true,
"logReaderMode": "tail", "logReaderMode": "tail",
"logDir": "C:/path/to/squad/log/folder", "logDir": "C:/path/to/squad/log/folder",
"ftpPort": 21, "ftpPort": 21,
"ftpUser": "FTP Username", "ftpUser": "FTP Username",
"ftpPassword": "FTP Password", "ftpPassword": "FTP Password",
"rconVerbose": true "ftpUseListForSize": false
}, },
"connectors": { "connectors": {
"discord": "Discord Login Token", "discord": "Discord Login Token",

View File

@ -19,7 +19,9 @@ export default class TailLogReader {
path: path.join(options.logDir, 'SquadGame.log'), path: path.join(options.logDir, 'SquadGame.log'),
fetchInterval: options.fetchInterval || 0, fetchInterval: options.fetchInterval || 0,
maxTempFileSize: options.maxTempFileSize || 5 * 1000 * 1000 // 5 MB maxTempFileSize: options.maxTempFileSize || 5 * 1000 * 1000, // 5 MB
useListForSize: options.useListForSize
}); });
if (typeof queueLine !== 'function') if (typeof queueLine !== 'function')

View File

@ -99,7 +99,10 @@ export default class SquadServer extends EventEmitter {
timeout: this.options.ftpTimeout, timeout: this.options.ftpTimeout,
verbose: this.options.ftpVerbose, verbose: this.options.ftpVerbose,
fetchInterval: this.options.ftpFetchInterval, fetchInterval: this.options.ftpFetchInterval,
maxTempFileSize: this.options.ftpMaxTempFileSize maxTempFileSize: this.options.ftpMaxTempFileSize,
// enable this for FTP servers that do not support SIZE
useListForSize: this.options.ftpUseListForSize
}); });
this.logParser.on('ADMIN_BROADCAST', (data) => { this.logParser.on('ADMIN_BROADCAST', (data) => {

View File

@ -6,15 +6,14 @@
"queryPort": 27165, "queryPort": 27165,
"rconPort": 21114, "rconPort": 21114,
"rconPassword": "password", "rconPassword": "password",
"rconVerbose": true,
"logReaderMode": "tail", "logReaderMode": "tail",
"logDir": "C:/path/to/squad/log/folder", "logDir": "C:/path/to/squad/log/folder",
"ftpPort": 21, "ftpPort": 21,
"ftpUser": "FTP Username", "ftpUser": "FTP Username",
"ftpPassword": "FTP Password", "ftpPassword": "FTP Password",
"ftpUseListForSize": false
"rconVerbose": true
}, },
"connectors": { "connectors": {
"discord": "Discord Login Token", "discord": "Discord Login Token",