summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-02-07 01:30:31 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-12 21:03:36 +0100
commit56490c86949135687e1ab0dd43d605c653f26c45 (patch)
tree77b0b19099ae0b8eb04646b62df5a35cd6c2be72 /src/gui/serverdialog.cpp
parent137ade7226af37d073a5755b90181275664dd65c (diff)
downloadMana-56490c86949135687e1ab0dd43d605c653f26c45.tar.gz
Mana-56490c86949135687e1ab0dd43d605c653f26c45.tar.bz2
Mana-56490c86949135687e1ab0dd43d605c653f26c45.tar.xz
Mana-56490c86949135687e1ab0dd43d605c653f26c45.zip
Restored manaserv-less builds
I made sure the manaserv based custom server don't get deleted when running a manaserv-less client session. Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r--src/gui/serverdialog.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 91e5fdeb..66afe912 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -281,10 +281,14 @@ void ServerDialog::action(const gcn::ActionEvent &event)
int index = mServersList->getSelected();
// Check login
- if (index < 0)
+ if (index < 0
+#ifndef ENABLE_MANASERV
+ || mServersListModel->getServer(index).type == ServerInfo::MANASERV
+#endif
+ )
{
OkDialog *dlg = new OkDialog(_("Error"),
- _("Please select a server."));
+ _("Please select a valid server."));
dlg->addActionListener(this);
}
else
@@ -470,7 +474,11 @@ void ServerDialog::loadServers()
server.type = ServerInfo::parseType(type);
// Ignore unknown server types
- if (server.type == ServerInfo::UNKNOWN)
+ if (server.type == ServerInfo::UNKNOWN
+#ifndef ENABLE_MANASERV
+ || server.type == ServerInfo::MANASERV
+#endif
+ )
{
logger->log("Ignoring server entry with unknown type: %s",
type.c_str());