From aa76d38f3c1c0a35b4aca85733d7840da4d494bd Mon Sep 17 00:00:00 2001 From: /dev/root Date: Sun, 12 Feb 2017 10:16:19 +0100 Subject: [PATCH] [News] Use client.json instead of caches.xml for update check --- src/Components/Modules/News.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/Components/Modules/News.cpp b/src/Components/Modules/News.cpp index b8b06019..c0ca72dc 100644 --- a/src/Components/Modules/News.cpp +++ b/src/Components/Modules/News.cpp @@ -57,28 +57,21 @@ namespace Components void News::CheckForUpdate() { - std::string caches = Utils::Cache::GetFile("/iw4/caches.xml"); + std::string _client = Utils::Cache::GetFile("/json/client"); - if (!caches.empty()) + if (!_client.empty()) { - std::string str = "()->current.integer = version; - Dvar::Var("cl_updateavailable").get()->current.boolean = (version > REVISION); - } + Dvar::Var("cl_updateversion").get()->current.integer = revision; + Dvar::Var("cl_updateavailable").get()->current.boolean = (revision > REVISION); } } }