From db0e0cd1f043dd1fb7c6298db6158a78c41373df Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 27 Feb 2010 20:07:16 +0100 Subject: Take the URL to the server list from the branding file This way, a Mana based game can have multiple servers associated with it (for example with different languages), listed under the same branding. Reviewed-by: Jared Adams --- src/gui/serverdialog.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui/serverdialog.cpp') diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index f439420b..3d6c0b6f 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -420,10 +420,14 @@ void ServerDialog::setFieldsReadOnly(const bool readOnly) void ServerDialog::downloadServerList() { - // try to load the configuration value for the onlineServerList - std::string listFile = config.getValue("onlineServerList", "void"); - // if there is no entry, try to load the file from the default updatehost - if (listFile == "void") + // Try to load the configuration value for the onlineServerList + std::string listFile = branding.getValue("onlineServerList", std::string()); + + if (listFile.empty()) + listFile = config.getValue("onlineServerList", std::string()); + + // Fall back to manasource.org when neither branding nor config set it + if (listFile.empty()) listFile = "http://manasource.org/serverlist.xml"; mDownload = new Net::Download(this, listFile, &downloadUpdate); -- cgit v1.2.3-70-g09d2