Remove VERSION file, and version / motd display from the ingame menu. Write git-version into the individual mod versions.

This commit is contained in:
Paul Chote
2010-12-23 11:22:05 +13:00
parent 275dfc43be
commit dc3bf2515a
8 changed files with 15 additions and 168 deletions

View File

@@ -51,36 +51,6 @@ namespace OpenRA.Server
}).Start();
}
public static void GetMOTD(string masterServerUrl)
{
var motd = Widget.RootWidget.GetWidget<ScrollingTextWidget>("MOTD_SCROLLER");
// Runs in a separate thread to prevent dns lookup hitches
new Thread(() =>
{
if (motd != null)
{
try
{
string motdText = GetData(new Uri(masterServerUrl + "motd.php?v=" + ClientVersion));
string[] p = motdText.Split('|');
if (p.Length == 2 && p[1].Length == int.Parse(p[0]))
{
motd.SetText(p[1]);
motd.ResetScroll();
}
}
catch
{
motd.SetText("Welcome to OpenRA. MOTD unable to be loaded from server.");
motd.ResetScroll();
}
}
ev.Set();
}).Start();
}
public static void Tick()
{
if (ev.WaitOne(TimeSpan.FromMilliseconds(0)))
@@ -95,23 +65,6 @@ namespace OpenRA.Server
var data = wc.DownloadData(uri);
return Encoding.UTF8.GetString(data);
}
public static void GetCurrentVersion(string masterServerUrl)
{
new Thread(() =>
{
try
{
ServerVersion = GetData(new Uri(masterServerUrl + "VERSION"));
}
catch
{
ServerVersion = "";
}
ev2.Set();
}).Start();
}
}
public class GameServer