]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/servermain.cpp
Merge pull request #48 from Oblomov/master
[dragonfireclient.git] / src / servermain.cpp
index 6eb45ea22a647def391a456f077f986c1a56bfdd..dc41720fb2ed44bdebbb796ed98a22af5f0fbd11 100644 (file)
@@ -69,6 +69,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "materials.h"
 #include "config.h"
 #include "mineral.h"
+#include "filesys.h"
 
 /*
        Settings.
@@ -139,6 +140,9 @@ int main(int argc, char *argv[])
        // Initialize porting::path_data and porting::path_userdata
        porting::initializePaths();
 
+       // Create user data directory
+       fs::CreateDir(porting::path_userdata);
+       
        // Initialize debug streams
 #ifdef RUN_IN_PLACE
        std::string debugfile = DEBUGFILE;
@@ -158,7 +162,7 @@ int main(int argc, char *argv[])
        BEGIN_DEBUG_EXCEPTION_HANDLER
 
        // Print startup message
-       dstream<<DTIME<<"minetest-c55"
+       dstream<<DTIME<<PROJECT_NAME <<
                        " with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
                        <<", "<<BUILD_INFO
                        <<std::endl;
@@ -319,7 +323,7 @@ int main(int argc, char *argv[])
                map_dir = g_settings.get("map-dir");
        
        // Create server
-       Server server(map_dir.c_str());
+       Server server(map_dir.c_str(), configpath);
        server.start(port);
 
        // Run server