-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -80,6 +80,21 @@ Server.prototype.writeServerConfig = function () { | |||||||
| fs.writeFileSync(file, config) | ||||||||
| } | ||||||||
|
|
||||||||
| Server.prototype.writeBattleEyeConfig = function (config) { | ||||||||
| if(this.options.battleEye) | ||||||||
| { | ||||||||
|
Comment on lines
+84
to
+85
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
To fix lint issues |
||||||||
| var filePath = path.join(this.options.path, 'battleye/BEServer_x64.cfg') | ||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| fs.writeFileSync(filePath, config) | ||||||||
|
|
||||||||
| var filePath2 = path.join(this.options.path, 'battleye/BEServer.cfg') | ||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| fs.writeFileSync(filePath2, config) | ||||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)
}) |
||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| Server.prototype.battleEyeConfigPath = function () { | ||||||||
| return path.join(this.options.path, 'battleye') | ||||||||
| } | ||||||||
|
|
||||||||
| Server.prototype.makeConfigParameter = function () { | ||||||||
| return '-config=' + path.join(configsDirectory, this.options.config) | ||||||||
| } | ||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.
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
configseems to be passed as argument instead of using the property? Or should it use the property instead?