Merge pull request #7934 from Mailaender/mime-join

Registered the openra:// protocol to join games on Linux
This commit is contained in:
Pavel Penev
2015-05-23 22:39:17 +03:00
5 changed files with 37 additions and 4 deletions

View File

@@ -61,7 +61,23 @@ namespace OpenRA.Mods.Common.LoadScreens
}
// Join a server directly
var connect = args != null ? args.GetValue("Launch.Connect", null) : null;
var connect = string.Empty;
if (args != null)
{
if (args.Contains("Launch.Connect"))
connect = args.GetValue("Launch.Connect", null);
if (args.Contains("Launch.URI"))
{
connect = args.GetValue("Launch.URI", null);
if (connect != null)
{
connect = connect.Replace("openra://", "");
connect = connect.TrimEnd('/');
}
}
}
if (!string.IsNullOrEmpty(connect))
{
var parts = connect.Split(':');