diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-13 18:38:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-13 18:38:46 +0300 |
commit | 259c2b3803bcf1dd16759b6adad7ac9006c36f09 (patch) | |
tree | 8480e83b9d9d20f0dea814fb924adcfb38c55168 | |
parent | 15bdde570fb44bc3329d5c3628445b8323759c84 (diff) | |
download | manaplus-259c2b3803bcf1dd16759b6adad7ac9006c36f09.tar.gz manaplus-259c2b3803bcf1dd16759b6adad7ac9006c36f09.tar.bz2 manaplus-259c2b3803bcf1dd16759b6adad7ac9006c36f09.tar.xz manaplus-259c2b3803bcf1dd16759b6adad7ac9006c36f09.zip |
Add mirror support for servers list.
-rw-r--r-- | data/evol/evol.manaplus | 1 | ||||
-rw-r--r-- | data/tmw/tmw.manaplus | 3 | ||||
-rw-r--r-- | src/defaults.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 3 |
4 files changed, 9 insertions, 2 deletions
diff --git a/data/evol/evol.manaplus b/data/evol/evol.manaplus index 3c3a46c2a..969fe06f0 100644 --- a/data/evol/evol.manaplus +++ b/data/evol/evol.manaplus @@ -6,6 +6,7 @@ <option name="screenshots" value="EvolOnline"/> <option name="loginMusic" value="Artis - The Adventure Begins.ogg"/> <option name="onlineServerList" value="http://www.evolonline.org/serverlist.xml"/> + <option name="onlineServerList2" value="http://evolonline.org/serverlist.xml"/> <option name="onlineServerFile" value="evol.xml"/> <option name="defaultServer" value="world.evolonline.org"/> <option name="defaultPort" value="6901"/> diff --git a/data/tmw/tmw.manaplus b/data/tmw/tmw.manaplus index db13b8f87..c4b66237e 100644 --- a/data/tmw/tmw.manaplus +++ b/data/tmw/tmw.manaplus @@ -5,7 +5,8 @@ <option name="appIcon" value="tmw/icons/tmw.png"/> <option name="screenshots" value="TheManaWorld"/> <option name="loginMusic" value="Magick - Real.ogg"/> - <option name="onlineServerList" value="http://manaplus.evolonline.org/serverlist.xml"/> + <option name="onlineServerList" value="http://manaplus.org/serverlist.xml"/> + <option name="onlineServerList2" value="http://www.manaplus.org/serverlist.xml"/> <option name="defaultServer" value="server.themanaworld.org"/> <option name="defaultPort" value="6901"/> <option name="defaultServerType" value="tmwathena"/> diff --git a/src/defaults.cpp b/src/defaults.cpp index 39eae6711..8a4d70999 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -435,7 +435,9 @@ DefaultsData* getBrandingDefaults() AddDEF("defaultPort", DEFAULT_PORT); AddDEF("defaultServerType", "tmwathena"); AddDEF("onlineServerList", - "http://manaplus.org/serverlist.xml"); + "http://manaplus.org/serverlist1.xml"); + AddDEF("onlineServerList2", + "http://www.manaplus.org/serverlist.xml"); AddDEF("onlineServerFile", "serverlistplus.xml"); AddDEF("appShort", "mana"); AddDEF("screenshots", "ManaPlus"); diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 2f50a4744..6c72301ca 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -424,6 +424,7 @@ void ServerDialog::downloadServerList() { // Try to load the configuration value for the onlineServerList std::string listFile = branding.getStringValue("onlineServerList"); + std::string listFile2 = branding.getStringValue("onlineServerList2"); // Fall back to manaplus.org when neither branding // nor config set it @@ -440,6 +441,8 @@ void ServerDialog::downloadServerList() &downloadUpdate, false, false, true); mDownload->setFile(std::string(mDir).append("/").append( branding.getStringValue("onlineServerFile"))); + if (!listFile2.empty()) + mDownload->addMirror(listFile2); mDownload->start(); config.setValue("serverslistupdate", getDateString()); |