From: Freddy Date: Fri, 3 Dec 2021 15:01:43 +0000 (+0100) Subject: ToS: update check and ToS download from xonotic.org X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f639a0087adce96bb2bb1e39d230226fc1ce9ee0;p=xonotic%2Fxonotic-data.pk3dir.git ToS: update check and ToS download from xonotic.org --- diff --git a/qcsrc/menu/xonotic/dialog_termsofservice.qc b/qcsrc/menu/xonotic/dialog_termsofservice.qc index 885330d93..66dde13ea 100644 --- a/qcsrc/menu/xonotic/dialog_termsofservice.qc +++ b/qcsrc/menu/xonotic/dialog_termsofservice.qc @@ -25,8 +25,7 @@ void DontAccept_Clicked(entity btn, entity me) void XonoticToSDialog_loadXonoticToS(entity me) { - string downloadurl = "http://maria.omaera.org/tos.txt"; - url_single_fopen(downloadurl, FILE_READ, XonoticToS_OnGet, me); + url_single_fopen(termsofservice_url, FILE_READ, XonoticToS_OnGet, me); } void XonoticToS_OnGet(entity fh, entity me, int status) diff --git a/qcsrc/menu/xonotic/dialog_termsofservice.qh b/qcsrc/menu/xonotic/dialog_termsofservice.qh index 1d45cdb2b..cb1f27927 100644 --- a/qcsrc/menu/xonotic/dialog_termsofservice.qh +++ b/qcsrc/menu/xonotic/dialog_termsofservice.qh @@ -1,6 +1,7 @@ #pragma once int autocvar__termsofservice_accepted; +const string termsofservice_url = "http://update.xonotic.org/tos.txt"; #include "rootdialog.qh" CLASS(XonoticToSDialog, XonoticRootDialog) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 6e551f559..06139566d 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -483,8 +483,7 @@ void updateCheck() // for privacy, munge the start count a little startcnt = floor((floor(startcnt / 10) + random()) * 10); - //uri = sprintf("http://update.xonotic.org/checkupdate.txt?version=%s&cnt=%d", uri_escape(cvar_string("g_xonoticversion")), startcnt); - uri = "http://maria.omaera.org/checkupdate.txt"; + uri = sprintf("http://update.xonotic.org/checkupdate.txt?version=%s&cnt=%d", uri_escape(cvar_string("g_xonoticversion")), startcnt); uri_get(uri, URI_GET_UPDATENOTIFICATION); }