diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-07-30 19:49:42 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-07-30 19:49:42 +0300 |
commit | cdadbdbd17d624dd45cca67f41309cbe776dc348 (patch) | |
tree | 332e7ee0975d25ce846d9d355dbb249255329220 /src/server.h | |
parent | 9b294ffa7a1f3cf7ee19111b7e5f4882f130dd21 (diff) | |
download | hax-minetest-server-cdadbdbd17d624dd45cca67f41309cbe776dc348.tar.gz hax-minetest-server-cdadbdbd17d624dd45cca67f41309cbe776dc348.zip |
Server configuration is now written when "/#setting whatever = whatever" is issued.
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h index 1da004da5..c300d40e6 100644 --- a/src/server.h +++ b/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; /* |