Cuberite
A lightweight, fast and extensible game server for Minecraft
Macros | Functions
IniFile.cpp File Reference
#include "Globals.h"
#include <fstream>
#include <ctype.h>
#include "IniFile.h"
Include dependency graph for IniFile.cpp:

Go to the source code of this file.

Macros

#define iniEOL   '\r' << endl
 

Functions

AStringVector ReadUpgradeIniPorts (cSettingsRepositoryInterface &a_Settings, const AString &a_KeyName, const AString &a_PortsValueName, const AString &a_OldIPv4ValueName, const AString &a_OldIPv6ValueName, const AString &a_DefaultValue)
 Reads the list of ports from the INI file, possibly upgrading from IPv4 / IPv6-specific values into new version-agnostic value. More...
 

Macro Definition Documentation

◆ iniEOL

#define iniEOL   '\r' << endl

Definition at line 32 of file IniFile.cpp.

Function Documentation

◆ ReadUpgradeIniPorts()

AStringVector ReadUpgradeIniPorts ( cSettingsRepositoryInterface a_Settings,
const AString a_KeyName,
const AString a_PortsValueName,
const AString a_OldIPv4ValueName,
const AString a_OldIPv6ValueName,
const AString a_DefaultValue 
)

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.

Definition at line 923 of file IniFile.cpp.