@@ -508,25 +508,25 @@ int ModApiMainMenu::l_get_favorites(lua_State *L)
508
508
509
509
if (servers[i][" password" ].asString ().size ()) {
510
510
lua_pushstring (L," password" );
511
- lua_pushboolean (L,true );
511
+ lua_pushboolean (L,servers[i][ " password " ]. asBool () );
512
512
lua_settable (L, top_lvl2);
513
513
}
514
514
515
515
if (servers[i][" creative" ].asString ().size ()) {
516
516
lua_pushstring (L," creative" );
517
- lua_pushboolean (L,true );
517
+ lua_pushboolean (L,servers[i][ " creative " ]. asBool () );
518
518
lua_settable (L, top_lvl2);
519
519
}
520
520
521
521
if (servers[i][" damage" ].asString ().size ()) {
522
522
lua_pushstring (L," damage" );
523
- lua_pushboolean (L,true );
523
+ lua_pushboolean (L,servers[i][ " damage " ]. asBool () );
524
524
lua_settable (L, top_lvl2);
525
525
}
526
526
527
527
if (servers[i][" pvp" ].asString ().size ()) {
528
528
lua_pushstring (L," pvp" );
529
- lua_pushboolean (L,true );
529
+ lua_pushboolean (L,servers[i][ " pvp " ]. asBool () );
530
530
lua_settable (L, top_lvl2);
531
531
}
532
532
0 commit comments