Merge remote-tracking branch 'LoganAir/masterserverdualstack' into IPv6

This commit is contained in:
Alam Ed Arias 2023-12-12 20:43:52 -05:00
commit 4f8513f504

View file

@ -60,7 +60,7 @@ static CV_PossibleValue_t masterserver_update_rate_cons_t[] = {
{0,NULL}
};
consvar_t cv_masterserver = CVAR_INIT ("masterserver", "https://mb.srb2.org/MS/0", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange);
consvar_t cv_masterserver = CVAR_INIT ("masterserver", "https://ds.ms.srb2.org/MS/0", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange);
consvar_t cv_servername = CVAR_INIT ("servername", "SRB2 server", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT|CV_ALLOWLUA, NULL, Update_parameters);
consvar_t cv_masterserver_update_rate = CVAR_INIT ("masterserver_update_rate", "15", CV_SAVE|CV_CALL|CV_NOINIT, masterserver_update_rate_cons_t, Update_parameters);
@ -539,6 +539,13 @@ static void MasterServer_OnChange(void)
CV_StealthSet(&cv_masterserver, cv_masterserver.defaultvalue);
}
if (
! cv_masterserver.changed &&
strcmp(cv_masterserver.string, "https://mb.srb2.org/MS/0") == 0
){
CV_StealthSet(&cv_masterserver, cv_masterserver.defaultvalue);
}
Set_api(cv_masterserver.string);
if (Online())