better errorhandling for announcements String must start with "Announcement from Masterserver:" now otherwise its not displayed

This commit is contained in:
Titus Tscharntke 2010-10-06 21:43:09 +00:00
parent 7fdeb7ca89
commit 72478c9f32

View File

@ -464,7 +464,8 @@ void MenuStateMasterserver::updateServerInfo() {
if(!announcementLoaded)
{
std::string announcementTxt = SystemFlags::getHTTP(Config::getInstance().getString("AnnouncementURL","http://megaglest.pepper.freeit.org/announcement.txt"));
announcementLabel.setText(announcementTxt);
if(announcementTxt.substr (0,31)=="Announcement from Masterserver:")
announcementLabel.setText(announcementTxt);
announcementLoaded=true;
}