fix #2792; Send Players: and Bots: to master server as different fields

This commit is contained in:
Igor Popov
2013-03-30 12:37:21 +04:00
parent 1ccd1cd1ac
commit 1bea6465c1

View File

@@ -55,7 +55,7 @@ namespace OpenRA.Mods.RA.Server
{
try
{
var url = "ping.php?port={0}&name={1}&state={2}&players={3}&mods={4}&map={5}&maxplayers={6}";
var url = "ping.php?port={0}&name={1}&state={2}&players={3}&bots={4}&mods={5}&map={6}&maxplayers={7}";
if (isInitialPing) url += "&new=1";
using (var wc = new WebClient())
@@ -66,7 +66,8 @@ namespace OpenRA.Mods.RA.Server
server.Settings.MasterServer + url.F(
server.Settings.ExternalPort, Uri.EscapeUriString(server.Settings.Name),
(int) server.State,
server.lobbyInfo.Clients.Count,
server.lobbyInfo.Clients.Where(c1 => c1.Bot == null).Count(),
server.lobbyInfo.Clients.Where(c1 => c1.Bot != null).Count(),
Game.CurrentMods.Select(f => "{0}@{1}".F(f.Key, f.Value.Version)).JoinWith(","),
server.lobbyInfo.GlobalSettings.Map,
server.Map.PlayerCount));