summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-12-05 00:12:04 -0700
committerJared Adams <jaxad0127@gmail.com>2009-12-05 00:12:04 -0700
commit3353d1a87fbfe2e6830a4b77470d9a5a1cdac593 (patch)
treef272b22eee0baa24f1de3cbc136327652045bb58 /src/gui
parent1eb02f83a5d3895e4e18db30ea10d88da94ba4c0 (diff)
downloadmana-client-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.tar.gz
mana-client-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.tar.bz2
mana-client-3353d1a87fbfe2e6830a4b77470d9a5a1cdac593.tar.xz
mana-client-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')
-rw-r--r--src/gui/serverdialog.cpp16
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);
}