summaryrefslogtreecommitdiff
path: root/src/net/manaserv/loginhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/manaserv/loginhandler.cpp')
-rw-r--r--src/net/manaserv/loginhandler.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/net/manaserv/loginhandler.cpp b/src/net/manaserv/loginhandler.cpp
index bf823562f..f1c597c00 100644
--- a/src/net/manaserv/loginhandler.cpp
+++ b/src/net/manaserv/loginhandler.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -339,11 +339,20 @@ void LoginHandler::readServerInfo(Net::MessageIn &msg)
return;
// Set the update host when included in the message
- const std::string updateHost = msg.readString();
+ std::string updateHost = msg.readString();
if (!updateHost.empty())
+ {
+ if (!checkPath(updateHost))
+ {
+ logger->log1("Warning: incorrect update server name");
+ updateHost = "";
+ }
mLoginData->updateHost = updateHost;
+ }
else
+ {
logger->log1("Warning: server does not have an update host set!");
+ }
// Read the client data folder for dynamic data loading.
// This is only used by the QT client.