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,
"rconPort": 21114,
"rconPassword": "password",
"rconVerbose": true,
"logReaderMode": "tail",
"logDir": "C:/path/to/squad/log/folder",
"ftpPort": 21,
"ftpUser": "FTP Username",
"ftpPassword": "FTP Password",
"rconVerbose": true
"ftpUseListForSize": false
},
"connectors": {
"discord": "Discord Login Token",

View File

@ -19,7 +19,9 @@ export default class TailLogReader {
path: path.join(options.logDir, 'SquadGame.log'),
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')

View File

@ -99,7 +99,10 @@ export default class SquadServer extends EventEmitter {
timeout: this.options.ftpTimeout,
verbose: this.options.ftpVerbose,
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) => {

View File

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