-
Notifications
You must be signed in to change notification settings - Fork 4
Added battle Eye config writter #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Dahlgren
left a comment
There was a problem hiding this 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') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
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)
})| if(this.options.battleEye) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
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?
|
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.