Unhardcode server ping/query URLs.
This commit is contained in:
@@ -108,11 +108,11 @@ namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
try
|
||||
{
|
||||
var serverList = server.ModData.Manifest.Get<WebServices>().ServerList;
|
||||
var endpoint = server.ModData.Manifest.Get<WebServices>().ServerAdvertise;
|
||||
using (var wc = new WebClient())
|
||||
{
|
||||
wc.Proxy = null;
|
||||
var masterResponseText = wc.UploadString(serverList + "ping", postData);
|
||||
var masterResponseText = wc.UploadString(endpoint, postData);
|
||||
|
||||
if (isInitialPing)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace OpenRA
|
||||
{
|
||||
public class WebServices : IGlobalModData
|
||||
{
|
||||
public readonly string ServerList = "http://master.openra.net/";
|
||||
public readonly string ServerList = "http://master.openra.net/games";
|
||||
public readonly string ServerAdvertise = "http://master.openra.net/ping";
|
||||
public readonly string MapRepository = "http://resource.openra.net/map/";
|
||||
public readonly string GameNews = "http://master.openra.net/gamenews";
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Game.RunAfterTick(() => RefreshServerListInner(games));
|
||||
};
|
||||
|
||||
var queryURL = services.ServerList + "games?protocol={0}&engine={1}&mod={2}&version={3}".F(
|
||||
var queryURL = services.ServerList + "?protocol={0}&engine={1}&mod={2}&version={3}".F(
|
||||
GameServer.ProtocolVersion,
|
||||
Uri.EscapeUriString(Game.EngineVersion),
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Id),
|
||||
|
||||
Reference in New Issue
Block a user