diff options
author | Sfan5 <sfan5@live.de> | 2014-04-08 21:39:21 +0200 |
---|---|---|
committer | Sfan5 <sfan5@live.de> | 2014-04-16 22:05:06 +0200 |
commit | 674be38fc262aab78ed75141c70e5c02830ca80d (patch) | |
tree | 4d3b6db33b957116f8e3bfaffa8456ff6dd12048 /src/main.cpp | |
parent | db60ae0459a7711bdaca2dff94c2e87e8e97796d (diff) | |
download | minetest-674be38fc262aab78ed75141c70e5c02830ca80d.tar.gz minetest-674be38fc262aab78ed75141c70e5c02830ca80d.tar.bz2 minetest-674be38fc262aab78ed75141c70e5c02830ca80d.zip |
Add redis database backend
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index c93af0d77..bb0c3a273 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,6 +84,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifdef USE_LEVELDB #include "database-leveldb.h" #endif +#if USE_REDIS +#include "database-redis.h" +#endif /* Settings. @@ -1242,7 +1245,7 @@ int main(int argc, char *argv[]) } if (!world_mt.exists("backend")) { errorstream << "Please specify your current backend in world.mt file:" - << std::endl << " backend = {sqlite3|leveldb|dummy}" << std::endl; + << std::endl << " backend = {sqlite3|leveldb|redis|dummy}" << std::endl; return 1; } std::string backend = world_mt.get("backend"); @@ -1257,6 +1260,10 @@ int main(int argc, char *argv[]) else if (migrate_to == "leveldb") new_db = new Database_LevelDB(&(ServerMap&)server.getMap(), world_path); #endif + #if USE_REDIS + else if (migrate_to == "redis") + new_db = new Database_Redis(&(ServerMap&)server.getMap(), world_path); + #endif else { errorstream << "Migration to " << migrate_to << " is not supported" << std::endl; return 1; |