summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-06-03 14:54:58 -0600
committerJared Adams <jaxad0127@gmail.com>2010-06-03 15:00:31 -0600
commit27bd3d3b5181b6192eb094a865e1821883d73eb4 (patch)
tree86ec18ab255e2feb26185982585592978beaf388
parent8615f1bbad630602009c04a317cd83e03aaa620c (diff)
downloadmana-27bd3d3b5181b6192eb094a865e1821883d73eb4.tar.gz
mana-27bd3d3b5181b6192eb094a865e1821883d73eb4.tar.bz2
mana-27bd3d3b5181b6192eb094a865e1821883d73eb4.tar.xz
mana-27bd3d3b5181b6192eb094a865e1821883d73eb4.zip
Ignore unknown server types in the server list
Problem reported by Sokon. Reviewed-by: Ignoring server entry with unknown type:
-rw-r--r--src/gui/serverdialog.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index c79925b3..3fdbd583 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -524,6 +524,15 @@ void ServerDialog::loadServers()
std::string type = XML::getProperty(serverNode, "type", "unknown");
server.type = ServerInfo::parseType(type);
+
+ // Ignore unknown server types
+ if (server.type == ServerInfo::UNKNOWN)
+ {
+ logger->log("Ignoring server entry with unknown type: %s\n",
+ type.c_str());
+ continue;
+ }
+
server.name = XML::getProperty(serverNode, "name", std::string());
std::string version = XML::getProperty(serverNode, "minimumVersion",