mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Merge pull request #8809 from furo321/append-settings
Transfer server settings while using append
This commit is contained in:
commit
7ee1dac08b
|
@ -8910,6 +8910,22 @@ bool CEditor::Append(const char *pFileName, int StorageType, bool IgnoreHistory)
|
||||||
}
|
}
|
||||||
NewMap.m_vpGroups.clear();
|
NewMap.m_vpGroups.clear();
|
||||||
|
|
||||||
|
// transfer server settings
|
||||||
|
for(const auto &pSetting : NewMap.m_vSettings)
|
||||||
|
{
|
||||||
|
// Check if setting already exists
|
||||||
|
bool AlreadyExists = false;
|
||||||
|
for(const auto &pExistingSetting : m_Map.m_vSettings)
|
||||||
|
{
|
||||||
|
if(!str_comp(pExistingSetting.m_aCommand, pSetting.m_aCommand))
|
||||||
|
AlreadyExists = true;
|
||||||
|
}
|
||||||
|
if(!AlreadyExists)
|
||||||
|
m_Map.m_vSettings.push_back(pSetting);
|
||||||
|
}
|
||||||
|
|
||||||
|
NewMap.m_vSettings.clear();
|
||||||
|
|
||||||
auto IndexMap = SortImages();
|
auto IndexMap = SortImages();
|
||||||
|
|
||||||
if(!IgnoreHistory)
|
if(!IgnoreHistory)
|
||||||
|
|
Loading…
Reference in a new issue