diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-30 19:46:55 +0200 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-30 19:47:55 +0200 |
commit | 96bee29e35f0790657fbd8bb67d2af79b498255c (patch) | |
tree | 0712c75629ab16fad84af11050ef94d8c8ac8137 /src/server.h | |
parent | 82ea53499710c9a4e92ec595d8c14c417bdd0ee6 (diff) | |
parent | f2051c98223d087c8ba3d7e4514935781c93ed1c (diff) | |
download | minetest-96bee29e35f0790657fbd8bb67d2af79b498255c.tar.gz minetest-96bee29e35f0790657fbd8bb67d2af79b498255c.tar.bz2 minetest-96bee29e35f0790657fbd8bb67d2af79b498255c.zip |
Merge branch 'upstream/master'
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h index 1da004da5..4a2d667a8 100644 --- a/src/server.h +++ b/src/server.h @@ -235,6 +235,8 @@ public: u16 peer_id; // The serialization version to use with the client u8 serialization_version; + // + u16 net_proto_version; // Version is stored in here after INIT before INIT2 u8 pending_serialization_version; @@ -244,6 +246,7 @@ public: { peer_id = 0; serialization_version = SER_FMT_VER_INVALID; + net_proto_version = 0; pending_serialization_version = SER_FMT_VER_INVALID; m_nearest_unsent_d = 0; m_nearest_unsent_reset_timer = 0.0; @@ -364,7 +367,8 @@ public: */ Server( - std::string mapsavedir + std::string mapsavedir, + std::string configpath ); ~Server(); void start(unsigned short port); @@ -443,6 +447,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 +617,9 @@ private: // Map directory std::string m_mapsavedir; + // Configuration path ("" = no configuration file) + std::string m_configpath; + bool m_shutdown_requested; /* |