multitheftauto/mtasa-blue

<rule> is being added to mtaserver.conf multiple times

Closed this issue · 2 comments

Describe the bug

Every time I start the server these lines are being added despite being already added:

<rule></rule>

<!-- A comma separated list of languages that the server supports (e.g. en). -->
<rule></rule>

<!-- A comma separated list of tags that describe the server (e.g. freeroam,roleplay). -->
<rule></rule>

<!-- The URL of the server's website. -->
<rule></rule>

<!-- A social media URL #1 (e.g. Discord). -->
<rule></rule>

<!-- A social media URL #2 (e.g. YouTube). -->
<rule></rule>

Also they are not being added properly as this is how they look in a fresh install:

<!-- The rule parameters are optional settings that the server will make public for the server browser/list.
     A brief description of the server. -->
<rule name="description" value="" />

<!-- A comma separated list of languages that the server supports (e.g. en). -->
<rule name="languages" value="" />

<!-- A comma separated list of tags that describe the server (e.g. freeroam,roleplay). -->
<rule name="tags" value="" />

<!-- The URL of the server's website. -->
<rule name="website_url" value="" />

<!-- A social media URL #1 (e.g. Discord). -->
<rule name="social_url_1" value="" />

<!-- A social media URL #2 (e.g. YouTube). -->
<rule name="social_url_2" value="" />

<!-- A social media URL #3 (e.g. Facebook). -->
<rule name="social_url_3" value="" />

Steps to reproduce

Upgrade a 1.6 server to 1.7

Version

1.7-untested-25543 Windows 64 bit.

Additional context

No response

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

I found the bug in CMainConfig.cpp. Missing setting nodes are added without copying attributes from the template. Will fix in a PR

I have tested and confirmed #4452 fixes this bug.