Implement metadata and httpRequest in the windows launcher. Untested.
This commit is contained in:
@@ -6,6 +6,7 @@ using System.IO;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
namespace OpenRA.Launcher
|
namespace OpenRA.Launcher
|
||||||
{
|
{
|
||||||
@@ -148,5 +149,20 @@ namespace OpenRA.Launcher
|
|||||||
|
|
||||||
return true;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user