diff --git a/config.json b/config.json index b3c9ac7..85b559c 100644 --- a/config.json +++ b/config.json @@ -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", diff --git a/log-parser/log-readers/ftp.js b/log-parser/log-readers/ftp.js index 4be86e7..97f600d 100644 --- a/log-parser/log-readers/ftp.js +++ b/log-parser/log-readers/ftp.js @@ -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') diff --git a/squad-server/index.js b/squad-server/index.js index 7475d71..6979a47 100644 --- a/squad-server/index.js +++ b/squad-server/index.js @@ -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) => { diff --git a/squad-server/scripts/templates/config-template.json b/squad-server/scripts/templates/config-template.json index 08bd3c0..84d10cb 100644 --- a/squad-server/scripts/templates/config-template.json +++ b/squad-server/scripts/templates/config-template.json @@ -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",