Fix the *CDP display
authorSmallJoker <st.rentsch@hotmail.com>
Mon, 14 Jul 2014 14:54:18 +0000 (16:54 +0200)
committerKahrl <kahrl@gmx.net>
Fri, 15 Aug 2014 19:46:04 +0000 (21:46 +0200)
src/script/lua_api/l_mainmenu.cpp

index cb32c9e82e970a672989a255bb043c0e5c5d6763..ae2fddf6d0d42d222467bcbc86af83913804315d 100644 (file)
@@ -508,25 +508,25 @@ int ModApiMainMenu::l_get_favorites(lua_State *L)
 
                if (servers[i]["password"].asString().size()) {
                        lua_pushstring(L,"password");
-                       lua_pushboolean(L,true);
+                       lua_pushboolean(L,servers[i]["password"].asBool());
                        lua_settable(L, top_lvl2);
                }
 
                if (servers[i]["creative"].asString().size()) {
                        lua_pushstring(L,"creative");
-                       lua_pushboolean(L,true);
+                       lua_pushboolean(L,servers[i]["creative"].asBool());
                        lua_settable(L, top_lvl2);
                }
 
                if (servers[i]["damage"].asString().size()) {
                        lua_pushstring(L,"damage");
-                       lua_pushboolean(L,true);
+                       lua_pushboolean(L,servers[i]["damage"].asBool());
                        lua_settable(L, top_lvl2);
                }
 
                if (servers[i]["pvp"].asString().size()) {
                        lua_pushstring(L,"pvp");
-                       lua_pushboolean(L,true);
+                       lua_pushboolean(L,servers[i]["pvp"].asBool());
                        lua_settable(L, top_lvl2);
                }