summaryrefslogtreecommitdiff
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
parent3c1b12b86d02fb9ec0e9cf86b3afe60893119eba (diff)
downloadmana-client-db0e0cd1f043dd1fb7c6298db6158a78c41373df.tar.gz
mana-client-db0e0cd1f043dd1fb7c6298db6158a78c41373df.tar.bz2
mana-client-db0e0cd1f043dd1fb7c6298db6158a78c41373df.tar.xz
mana-client-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
-rw-r--r--docs/example.mana1
-rw-r--r--mana.files1
-rw-r--r--src/gui/serverdialog.cpp12
-rwxr-xr-xupdate-creator.sh1
4 files changed, 11 insertions, 4 deletions
diff --git a/docs/example.mana b/docs/example.mana
index 795d8d40..aa87b96f 100644
--- a/docs/example.mana
+++ b/docs/example.mana
@@ -13,6 +13,7 @@ filename / path as a command line parameter
<option name="appShort" value="mana"/>
<option name="appIcon" value="icons/mana.png"/>
<option name="loginMusic" value="Magick - Real.ogg"/>
+ <option name="onlineServerList" value="http://manasource.org/serverlist.xml"/>
<option name="defaultServer" value="testing.manasource.org"/>
<option name="defaultPort" value="9601"/>
<option name="defaultUpdateHost" value="http://updates.themanaworld.org"/>
diff --git a/mana.files b/mana.files
index ff28a90d..7f775498 100644
--- a/mana.files
+++ b/mana.files
@@ -26,6 +26,7 @@
./data/icons/Makefile.am
./data/Makefile.am
./docs/clientupdates.txt
+./docs/example.mana
./docs/FAQ.txt
./docs/HACKING.txt
./docs/items.txt
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);
diff --git a/update-creator.sh b/update-creator.sh
index e0c5463f..edda5613 100755
--- a/update-creator.sh
+++ b/update-creator.sh
@@ -4,4 +4,5 @@ find -name \*.cpp \
-o -name \*.am \
-o -name \*.txt \
-o -name \*.xml \
+ -o -name \*.mana \
| sort > mana.files