diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-06-03 14:54:58 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-06-03 15:00:31 -0600 |
commit | 27bd3d3b5181b6192eb094a865e1821883d73eb4 (patch) | |
tree | 86ec18ab255e2feb26185982585592978beaf388 /src | |
parent | 8615f1bbad630602009c04a317cd83e03aaa620c (diff) | |
download | mana-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:
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/serverdialog.cpp | 9 |
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", |