diff --git a/OpenRA.Launcher/JSBridge.cs b/OpenRA.Launcher/JSBridge.cs index 268918e43a..e9c0ea90a4 100644 --- a/OpenRA.Launcher/JSBridge.cs +++ b/OpenRA.Launcher/JSBridge.cs @@ -6,6 +6,7 @@ using System.IO; using System.Diagnostics; using System.Text.RegularExpressions; using System.Windows.Forms; +using System.Net; namespace OpenRA.Launcher { @@ -148,5 +149,20 @@ namespace OpenRA.Launcher return true; } + + public string metadata(string field, string mod) + { + if (field == "VERSION") + return allMods[mod].Version; + + return ""; + } + + public string httpRequest(string url) + { + var wc = new WebClient(); + var data = wc.DownloadData(new Uri(url)); + return Encoding.UTF8.GetString(data); + } } }