From 72478c9f324d349e68c4b7282e9e41a7191617aa Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Wed, 6 Oct 2010 21:43:09 +0000 Subject: [PATCH] better errorhandling for announcements String must start with "Announcement from Masterserver:" now otherwise its not displayed --- source/glest_game/menu/menu_state_masterserver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/glest_game/menu/menu_state_masterserver.cpp b/source/glest_game/menu/menu_state_masterserver.cpp index 7b91f8e3b..5ea6af1b7 100644 --- a/source/glest_game/menu/menu_state_masterserver.cpp +++ b/source/glest_game/menu/menu_state_masterserver.cpp @@ -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; }