summaryrefslogtreecommitdiffstats
path: root/src/IniFile.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2015-02-06 21:52:14 +0100
committerHowaner <franzi.moos@googlemail.com>2015-02-06 21:52:14 +0100
commit2c7925f0adc17d7680ff9791832ab2c349c2301f (patch)
treeef6233b0d9dece6f7520996f2a4d850470e2c2d3 /src/IniFile.h
parentReadded old DistributeStackToAreas() comment. (diff)
parentSwitched LuaState to use sizeof... (diff)
downloadcuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.gz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.bz2
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.lz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.xz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.zst
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.zip
Diffstat (limited to 'src/IniFile.h')
-rw-r--r--src/IniFile.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/IniFile.h b/src/IniFile.h
index e5879f46c..3e717723f 100644
--- a/src/IniFile.h
+++ b/src/IniFile.h
@@ -15,9 +15,7 @@
!! MODIFIED BY FAKETRUTH and madmaxoft!!
*/
-#ifndef CIniFile_H
-#define CIniFile_H
-
+#pragma once
@@ -215,4 +213,22 @@ public:
// tolua_end
-#endif
+
+
+
+
+/** Reads the list of ports from the INI file, possibly upgrading from IPv4/IPv6-specific values into new version-agnostic value.
+Reads the list of ports from a_PortsValueName. If that value doesn't exist or is empty, the list is combined from values
+in a_OldIPv4ValueName and a_OldIPv6ValueName; in this case the old values are removed from the INI file.
+If there is none of the three values or they are all empty, the default is used and stored in the Ports value. */
+AStringVector ReadUpgradeIniPorts(
+ cIniFile & a_IniFile,
+ const AString & a_KeyName,
+ const AString & a_PortsValueName,
+ const AString & a_OldIPv4ValueName,
+ const AString & a_OldIPv6ValueName,
+ const AString & a_DefaultValue
+);
+
+
+