motd failure avoidance

This commit is contained in:
Caleb Anderson
2010-10-15 01:24:22 -05:00
committed by Chris Forbes
parent 10e918c375
commit 9a54074b1b

View File

@@ -62,8 +62,13 @@ namespace OpenRA.Server
{
try
{
motd.SetText(GetData(new Uri(masterServerUrl + "motd.php?v=" + ClientVersion)));
motd.ResetScroll();
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
{