From f042aa2d4f00b78b053c66ed73374c4dd0f891d5 Mon Sep 17 00:00:00 2001 From: /dev/root Date: Sat, 4 Feb 2017 19:07:02 +0100 Subject: [PATCH] [Changelog] Improved UIScript - only run once - support for offline --- src/Components/Modules/Changelog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Components/Modules/Changelog.cpp b/src/Components/Modules/Changelog.cpp index 376c855f..83cc10c0 100644 --- a/src/Components/Modules/Changelog.cpp +++ b/src/Components/Modules/Changelog.cpp @@ -6,12 +6,20 @@ namespace Components void Changelog::LoadChangelog(UIScript::Token) { + if (!Changelog::Line.empty()) + return; + std::vector changelog; Changelog::Line.clear(); { std::string uncleaned = Utils::Cache::GetFile("/iw4/changelog.txt"); + if (uncleaned.empty()) + { + uncleaned = "\n\n^1Unable to get changelog."; + } + changelog = Utils::String::Explode(uncleaned, '\n'); }