mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Server configuration is now written when "/#setting whatever = whatever" is issued.
This commit is contained in:
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;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user