Skip to content

Instantly share code, notes, and snippets.



Last active Dec 22, 2015
What would you like to do?
diff --git a/doc/minetest.6 b/doc/minetest.6
index 8099128..f837303 100644
--- a/doc/minetest.6
+++ b/doc/minetest.6
@@ -78,7 +78,7 @@ Set world path
\-\-migrate <value>
Migrate from current map backend to another. Possible values are sqlite3
-and leveldb. Only works when using --server.
+and leveldb.
Please report all bugs to Perttu Ahola <>.
diff --git a/src/main.cpp b/src/main.cpp
index dfe1e5c..882d61d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -796,7 +796,7 @@ int main(int argc, char *argv[])
allowed_options.insert(std::make_pair("gameid", ValueSpec(VALUETYPE_STRING,
_("Set gameid (\"--gameid list\" prints available ones)"))));
allowed_options.insert(std::make_pair("migrate", ValueSpec(VALUETYPE_STRING,
- _("Migrate from current map backend to another (Only works when using minetestserver or with --server)"))));
+ _("Migrate from current map backend to another"))));
#ifndef SERVER
allowed_options.insert(std::make_pair("videomodes", ValueSpec(VALUETYPE_FLAG,
_("Show available video modes"))));
@@ -1096,11 +1096,16 @@ int main(int argc, char *argv[])
Run dedicated server if asked to or no other option
+ Option --migrate is handled in dedicated server branch
+ so check for that as well.
#ifdef SERVER
bool run_dedicated_server = true;
- bool run_dedicated_server = cmd_args.getFlag("server");
+ bool run_dedicated_server =
+ cmd_args.getFlag("server") ||
+ cmd_args.exists("migrate");
g_settings->set("server_dedicated", run_dedicated_server ? "true" : "false");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment