Conversation
Dahlgren
left a comment
There was a problem hiding this comment.
Does Linux server use BEServer.cfg/BEServer_x64.cfg or beserver.cfg/beserver_x64.cfg?
| Server.prototype.writeBattleEyeConfig = function (config) { | ||
| if(this.options.battleEye) | ||
| { | ||
| var filePath = path.join(this.options.path, 'battleye/BEServer_x64.cfg') |
There was a problem hiding this comment.
| var filePath = path.join(this.options.path, 'battleye/BEServer_x64.cfg') | |
| var filePath = path.join(this.battleEyeConfigPath(), 'BEServer_x64.cfg') |
| var filePath = path.join(this.options.path, 'battleye/BEServer_x64.cfg') | ||
| fs.writeFileSync(filePath, config) | ||
|
|
||
| var filePath2 = path.join(this.options.path, 'battleye/BEServer.cfg') |
There was a problem hiding this comment.
| var filePath2 = path.join(this.options.path, 'battleye/BEServer.cfg') | |
| var filePath2 = path.join(this.battleEyeConfigPath(), 'BEServer.cfg') |
| fs.writeFileSync(filePath, config) | ||
|
|
||
| var filePath2 = path.join(this.options.path, 'battleye/BEServer.cfg') | ||
| fs.writeFileSync(filePath2, config) |
There was a problem hiding this comment.
Instead of doing this twice you could make this into a loop
var self = this
['BEServer.cfg', 'BEServer_x64.cfg'].forEach(function (filename) {
var filePath = path.join(self.battleEyeConfigPath(), filename)
fs.writeFileSync(filePath, config)
})| if(this.options.battleEye) | ||
| { |
There was a problem hiding this comment.
| if(this.options.battleEye) | |
| { | |
| if (this.options.battleEye) { |
To fix lint issues
| } | ||
|
|
||
| Server.prototype.writeBattleEyeConfig = function (config) { | ||
| if(this.options.battleEye) |
There was a problem hiding this comment.
Does this need to be conditional? Would the function be called if it isn't desired to create the file? Since config seems to be passed as argument instead of using the property? Or should it use the property instead?
|
Dahlgren thanks for review. I am new to node and github, just wanted to try the flow. The change it self is just something I added in my setup. I am running 64bit arma3 on windows only with virtual server mode, therefore no idea how and if works with linux. |
No description provided.