diff options
author | Fate <fate-tmw@googlemail.com> | 2009-05-19 14:00:01 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-23 21:43:16 +0200 |
commit | 0507f575f2d9abe953e53822a52e66677cd8775c (patch) | |
tree | 5825b902e41861a4ed7e13c6ed2582ba545e0be7 | |
parent | 2a9f8e05312c210ec204e09861f47c3d017706eb (diff) | |
download | mana-0507f575f2d9abe953e53822a52e66677cd8775c.tar.gz mana-0507f575f2d9abe953e53822a52e66677cd8775c.tar.bz2 mana-0507f575f2d9abe953e53822a52e66677cd8775c.tar.xz mana-0507f575f2d9abe953e53822a52e66677cd8775c.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.
(cherry picked from commit 3dd404ee8a02958089bf2c6901fb877d2fae760e)
-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 fb061818..f05ba665 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", ""); |