summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/hostsgroup.h38
-rw-r--r--src/net/serverinfo.h7
2 files changed, 45 insertions, 0 deletions
diff --git a/src/net/hostsgroup.h b/src/net/hostsgroup.h
new file mode 100644
index 000000000..ec217630f
--- /dev/null
+++ b/src/net/hostsgroup.h
@@ -0,0 +1,38 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2016 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NET_HOSTSGROUP_H
+#define NET_HOSTSGROUP_H
+
+#include "utils/stringvector.h"
+
+#include "localconsts.h"
+
+struct HostsGroup final
+{
+ HostsGroup()
+ {
+ }
+
+ std::string name;
+ StringVect hosts;
+};
+
+#endif // NET_HOSTSGROUP_H
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 85d0f6bdd..e2949af0b 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -25,6 +25,8 @@
#include "enums/net/servertype.h"
+#include "net/hostsgroup.h"
+
#include "utils/stringutils.h"
#include "localconsts.h"
@@ -43,6 +45,7 @@ class ServerInfo final
std::string onlineListUrl;
std::string supportUrl;
std::vector<std::string> updateMirrors;
+ std::vector<HostsGroup> updateHosts;
uint16_t port;
VersionString version;
int packetVersion;
@@ -59,6 +62,7 @@ class ServerInfo final
onlineListUrl(),
supportUrl(),
updateMirrors(),
+ updateHosts(),
#ifdef TMWA_SUPPORT
port(6901),
#else
@@ -82,6 +86,7 @@ class ServerInfo final
onlineListUrl(info.onlineListUrl),
supportUrl(info.supportUrl),
updateMirrors(info.updateMirrors),
+ updateHosts(info.updateHosts),
port(info.port),
version(),
packetVersion(info.packetVersion),
@@ -103,6 +108,7 @@ class ServerInfo final
onlineListUrl = info.onlineListUrl;
supportUrl = info.supportUrl;
updateMirrors = info.updateMirrors;
+ updateHosts = info.updateHosts;
port = info.port;
save = info.save;
persistentIp = info.persistentIp;
@@ -131,6 +137,7 @@ class ServerInfo final
onlineListUrl.clear();
supportUrl.clear();
updateMirrors.clear();
+ updateHosts.clear();
version.first = 0;
version.second.clear();
packetVersion = 0;