summaryrefslogtreecommitdiffstats
path: root/src/WebAdmin.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-24 10:11:34 +0100
committerMattes D <github@xoft.cz>2015-01-27 14:53:26 +0100
commitf477b524bb2ebcacab705fca036d555cfa8f8e8d (patch)
treed8fd13670eddbd2e02e9e15330e20e1ad1c964fa /src/WebAdmin.h
parentIniFile: Added common code to migrate ports. (diff)
downloadcuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.tar
cuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.tar.gz
cuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.tar.bz2
cuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.tar.lz
cuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.tar.xz
cuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.tar.zst
cuberite-f477b524bb2ebcacab705fca036d555cfa8f8e8d.zip
Diffstat (limited to '')
-rw-r--r--src/WebAdmin.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/WebAdmin.h b/src/WebAdmin.h
index a85fb1f0c..86a8a9a4b 100644
--- a/src/WebAdmin.h
+++ b/src/WebAdmin.h
@@ -5,7 +5,6 @@
#pragma once
-#include "OSSupport/Socket.h"
#include "Bindings/LuaState.h"
#include "IniFile.h"
#include "HTTPServer/HTTPServer.h"
@@ -135,8 +134,16 @@ public:
/** Returns the prefix needed for making a link point to the webadmin root from the given URL ("../../../webadmin"-style) */
AString GetBaseURL(const AString & a_URL);
- AString GetIPv4Ports(void) const { return m_PortsIPv4; }
- AString GetIPv6Ports(void) const { return m_PortsIPv6; }
+ /** Returns the list of ports used for the webadmin. */
+ AString GetPorts(void) const { return StringsConcat(m_Ports, ','); }
+
+ /** OBSOLETE: Returns the list of IPv4 ports used for the webadmin.
+ Currently there is no distinction between IPv4 and IPv6; use GetPorts() instead. */
+ AString GetIPv4Ports(void) const { return GetPorts(); }
+
+ /** OBSOLETE: Returns the list of IPv6 ports used for the webadmin.
+ Currently there is no distinction between IPv4 and IPv6; use GetPorts() instead. */
+ AString GetIPv6Ports(void) const { return GetPorts(); }
// tolua_end
@@ -205,8 +212,8 @@ protected:
PluginList m_Plugins;
- AString m_PortsIPv4;
- AString m_PortsIPv6;
+ /** The ports on which the webadmin is running. */
+ AStringVector m_Ports;
/** The Lua template script to provide templates: */
cLuaState m_TemplateScript;