mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* trigger loop convert * Automated clang-tidy change: modernize-loop-convert * fixed refactor * Automated clang-tidy change: modernize-loop-convert * compile * first look through * fixes and start to use a few ranges * revert autogenerated file * compilation fix * second pass * renamed loop variable --------- Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
43 lines
1 KiB
C++
43 lines
1 KiB
C++
/** @file
|
|
*
|
|
* @par History
|
|
* - 2009/09/03 MuadDib: Relocation of multi related cpp/h
|
|
*/
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "../../clib/cfgfile.h"
|
|
#include "../../clib/fileutil.h"
|
|
#include "../../clib/refptr.h"
|
|
#include "../../plib/pkg.h"
|
|
#include "../../plib/systemstate.h"
|
|
#include "../cfgrepos.h"
|
|
|
|
|
|
namespace Pol::Multi
|
|
{
|
|
void load_special_storedconfig( const std::string& cfgname )
|
|
{
|
|
std::string main_cfg = "config/" + cfgname + ".cfg";
|
|
|
|
Core::CreateEmptyStoredConfigFile( main_cfg );
|
|
ref_ptr<Core::StoredConfigFile> scfg = Core::FindConfigFile( main_cfg, "" );
|
|
if ( Clib::FileExists( main_cfg.c_str() ) )
|
|
{
|
|
Clib::ConfigFile cf_main( main_cfg.c_str() );
|
|
scfg->load( cf_main );
|
|
}
|
|
|
|
for ( auto pkg : Plib::systemstate.packages )
|
|
{
|
|
// string filename = pkg->dir() + cfgname + ".cfg";
|
|
std::string filename = Plib::GetPackageCfgPath( pkg, cfgname + ".cfg" );
|
|
if ( Clib::FileExists( filename.c_str() ) )
|
|
{
|
|
Clib::ConfigFile cf( filename.c_str() );
|
|
scfg->load( cf );
|
|
}
|
|
}
|
|
}
|
|
} // namespace Pol::Multi
|