diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-12-05 00:12:04 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-12-05 00:12:04 -0700 |
commit | 3353d1a87fbfe2e6830a4b77470d9a5a1cdac593 (patch) | |
tree | f272b22eee0baa24f1de3cbc136327652045bb58 /src/gui/serverdialog.cpp | |
parent | 1eb02f83a5d3895e4e18db30ea10d88da94ba4c0 (diff) | |
download | mana-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.tar.gz mana-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.tar.bz2 mana-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.tar.xz mana-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.zip |
Add a type member to ServerInfo and code for it
Some of the code is waiting for ifdef removal.
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r-- | src/gui/serverdialog.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index ec2b0cf4..39c2792f 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -355,8 +355,8 @@ void ServerDialog::loadServers() { // check wether the build matches (remove with last instances // if _SUPPORT ifdefs) - if (compareStrI(XML::getProperty(server, "type", "unknown"), - SERVER_BUILD)) + std::string type = XML::getProperty(server, "type", "unknown"); + if (compareStrI(type, SERVER_BUILD)) { continue; } @@ -368,6 +368,18 @@ void ServerDialog::loadServers() { if (xmlStrEqual(subnode->name, BAD_CAST "connection")) { + if (compareStrI(type, "manaserv")) + { + currentServer.type = ServerInfo::MANASERV; + } + else if (compareStrI(type, "eathena")) + { + currentServer.type = ServerInfo::EATHENA; + } + else + { + currentServer.type = ServerInfo::UNKNOWN; + } currentServer.hostname = XML::getProperty(subnode, "hostname", std::string()); currentServer.port = XML::getProperty(subnode, "port", DEFAULT_PORT); } |