Skip to content

Conversation

@ards
Copy link

@ards ards commented Nov 23, 2021

No description provided.

Copy link
Owner

@Dahlgren Dahlgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
})

Comment on lines +84 to +85
if(this.options.battleEye)
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(this.options.battleEye)
{
if (this.options.battleEye) {

To fix lint issues

}

Server.prototype.writeBattleEyeConfig = function (config) {
if(this.options.battleEye)
Copy link
Owner

@Dahlgren Dahlgren Nov 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@ards
Copy link
Author

ards commented Feb 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants