Skip to content

Commit

Permalink
Merge pull request scp-fs2open#5921 from MjnMixael/save_multi_settings
Browse files Browse the repository at this point in the history
Save these to the ini file
  • Loading branch information
JohnAFernandez committed Jan 25, 2024
2 parents e987d1c + 509f887 commit 248cec7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/scripting/api/libs/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ ADE_VIRTVAR(MultiLogin, l_Options, "string", "The multiplayer PXO login name", "

if (ADE_SETTING_VAR && (login != nullptr)) {
strcpy_s(Multi_tracker_login, login);
os_config_write_string("PXO", "Login", login);
}

return ade_set_args(L, "s", Multi_tracker_login);
Expand All @@ -80,6 +81,7 @@ ADE_VIRTVAR(MultiPassword, l_Options, "string", "The multiplayer PXO login passw

if (ADE_SETTING_VAR && (pswd != nullptr)) {
strcpy_s(Multi_tracker_passwd, pswd);
os_config_write_string("PXO", "Password", pswd);
}

return ade_set_args(L, "b", (strlen(Multi_tracker_passwd) != 0));
Expand All @@ -92,6 +94,7 @@ ADE_VIRTVAR(MultiSquad, l_Options, "string", "The multiplayer PXO squad name", "

if (ADE_SETTING_VAR && (squad != nullptr)) {
strcpy_s(Multi_tracker_squad_name, squad);
os_config_write_string("PXO", "SquadName", squad);
}

return ade_set_args(L, "s", Multi_tracker_squad_name);
Expand Down

0 comments on commit 248cec7

Please sign in to comment.