diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_mainmenu.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index f2628d0a1..cb32c9e82 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -456,15 +456,12 @@ int ModApiMainMenu::l_get_favorites(lua_State *L) } std::vector<ServerListSpec> servers; -#if USE_CURL + if(listtype == "online") { servers = ServerList::getOnline(); } else { servers = ServerList::getLocal(); } -#else - servers = ServerList::getLocal(); -#endif lua_newtable(L); int top = lua_gettop(L); @@ -582,15 +579,12 @@ int ModApiMainMenu::l_delete_favorite(lua_State *L) (listtype != "online")) return 0; -#if USE_CURL + if(listtype == "online") { servers = ServerList::getOnline(); } else { servers = ServerList::getLocal(); } -#else - servers = ServerList::getLocal(); -#endif int fav_idx = luaL_checkinteger(L,1) -1; |