diff options
author | Fate <fate-tmw@googlemail.com> | 2009-05-19 14:00:01 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-05-19 14:00:01 +0000 |
commit | 3dd404ee8a02958089bf2c6901fb877d2fae760e (patch) | |
tree | 470aa876623b4a9f7d2f404ebca72edac48d6659 | |
parent | 06ee3ce2a54d5bb481e27f9d61be75b7f9d0fa45 (diff) | |
download | mana-client-3dd404ee8a02958089bf2c6901fb877d2fae760e.tar.gz mana-client-3dd404ee8a02958089bf2c6901fb877d2fae760e.tar.bz2 mana-client-3dd404ee8a02958089bf2c6901fb877d2fae760e.tar.xz mana-client-3dd404ee8a02958089bf2c6901fb877d2fae760e.zip |
Default port consistently uses 6901 on eAthena. branding.xml also defaults to 6901 now since most players play on eAthena, so the -P client parameter finally works out of the box again.
-rw-r--r-- | data/branding.xml | 2 | ||||
-rw-r--r-- | src/main.cpp | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/data/branding.xml b/data/branding.xml index 29974ab4..fd5779f6 100644 --- a/data/branding.xml +++ b/data/branding.xml @@ -15,7 +15,7 @@ writing a branding.xml for their forks. <option name="appIcon" value="icons/tmw.png"/> <option name="loginMusic" value="Magick - Real.ogg"/> <option name="defaultServer" value="server.themanaworld.org"/> - <option name="defaultPort" value="9601"/> + <option name="defaultPort" value="6901"/> <option name="defaultUpdateHost" value="http://updates.themanaworld.org"/> <option name="font" value="fonts/dejavusans.ttf" /> <option name="boldFont" value="fonts/dejavusans-bold.ttf" /> diff --git a/src/main.cpp b/src/main.cpp index f15eeccc..7c48e728 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -126,6 +126,12 @@ #include <sys/stat.h> #endif +#ifdef TWMSERV_SUPPORT +#define DEFAULT_PORT 9601 +#else +#define DEFAULT_PORT 6901 +#endif + namespace { struct SetupListener : public gcn::ActionListener @@ -347,11 +353,7 @@ static void initConfiguration(const Options &options) std::string defaultHost = branding.getValue("defaultServer", "server.themanaworld.org"); config.setValue("host", defaultHost); -#ifdef TWMSERV_SUPPORT - int defaultPort = (int)branding.getValue("defaultPort", 9601); -#else - int defaultPort = (int)branding.getValue("defaultPort", 6901); -#endif + int defaultPort = (int)branding.getValue("defaultPort", DEFAULT_PORT); config.setValue("port", defaultPort); config.setValue("hwaccel", false); #if (defined __APPLE__ || defined WIN32) && defined USE_OPENGL @@ -953,7 +955,7 @@ int main(int argc, char *argv[]) "server.themanaworld.org").c_str(); } if (options.serverPort == 0) { - loginData.port = (short) branding.getValue("defaultPort", 9601); + loginData.port = (short) branding.getValue("defaultPort", DEFAULT_PORT); } if (loginData.username.empty() && loginData.remember) { loginData.username = config.getValue("username", ""); |