summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-27 20:07:16 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-28 17:06:52 +0100
commitdb0e0cd1f043dd1fb7c6298db6158a78c41373df (patch)
tree89ec932dedbd5b49cf6d7fb6198d780f19dca21e /src
parent3c1b12b86d02fb9ec0e9cf86b3afe60893119eba (diff)
downloadmana-db0e0cd1f043dd1fb7c6298db6158a78c41373df.tar.gz
mana-db0e0cd1f043dd1fb7c6298db6158a78c41373df.tar.bz2
mana-db0e0cd1f043dd1fb7c6298db6158a78c41373df.tar.xz
mana-db0e0cd1f043dd1fb7c6298db6158a78c41373df.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/gui/serverdialog.cpp12
1 files changed, 8 insertions, 4 deletions
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);