mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Server configuration is now written when "/#setting whatever = whatever" is issued.
This commit is contained in:
parent
9b294ffa7a
commit
cdadbdbd17
7 changed files with 36 additions and 14 deletions
13
src/server.h
13
src/server.h
|
@ -364,7 +364,8 @@ public:
|
|||
*/
|
||||
|
||||
Server(
|
||||
std::string mapsavedir
|
||||
std::string mapsavedir,
|
||||
std::string configpath
|
||||
);
|
||||
~Server();
|
||||
void start(unsigned short port);
|
||||
|
@ -443,6 +444,13 @@ public:
|
|||
dstream<<"WARNING: Auth not found for "<<name<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Saves g_settings to configpath given at initialization
|
||||
void saveConfig()
|
||||
{
|
||||
if(m_configpath != "")
|
||||
g_settings.updateConfigFile(m_configpath.c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -606,6 +614,9 @@ private:
|
|||
// Map directory
|
||||
std::string m_mapsavedir;
|
||||
|
||||
// Configuration path ("" = no configuration file)
|
||||
std::string m_configpath;
|
||||
|
||||
bool m_shutdown_requested;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue