summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-15 16:21:04 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-15 19:29:06 -0600
commit0698461bd4001c6a1e3be1d755b3ebbafe229d42 (patch)
treef4e7767d141c0dc91ff4277174e3200782d4c7d4 /src/gui/serverdialog.cpp
parent7229426c63ce7bd40f509c26b4bdf4c12a5ba5f2 (diff)
downloadmana-0698461bd4001c6a1e3be1d755b3ebbafe229d42.tar.gz
mana-0698461bd4001c6a1e3be1d755b3ebbafe229d42.tar.bz2
mana-0698461bd4001c6a1e3be1d755b3ebbafe229d42.tar.xz
mana-0698461bd4001c6a1e3be1d755b3ebbafe229d42.zip
Fix some branding issues
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r--src/gui/serverdialog.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index eb6e9b4b..6a6c7a91 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -49,16 +49,6 @@
static const int MAX_SERVERLIST = 6;
-static ServerInfo::Type stringToServerType(const std::string &type)
-{
- if (compareStrI(type, "eathena") == 0)
- return ServerInfo::EATHENA;
- else if (compareStrI(type, "manaserv") == 0)
- return ServerInfo::MANASERV;
-
- return ServerInfo::UNKNOWN;
-}
-
static std::string serverTypeToString(ServerInfo::Type type)
{
switch (type)
@@ -448,7 +438,7 @@ void ServerDialog::loadServers()
std::string type = XML::getProperty(serverNode, "type", "unknown");
- server.type = stringToServerType(type);
+ server.type = ServerInfo::parseType(type);
server.name = XML::getProperty(serverNode, "name", std::string());
if (server.type == ServerInfo::UNKNOWN)
@@ -503,7 +493,7 @@ void ServerDialog::loadCustomServers()
ServerInfo server;
server.hostname = config.getValue(nameKey, "");
- server.type = stringToServerType(config.getValue(typeKey, ""));
+ server.type = ServerInfo::parseType(config.getValue(typeKey, ""));
const int defaultPort = defaultPortForServerType(server.type);
server.port = (unsigned short) config.getValue(portKey, defaultPort);