From fddbf65e2819d487021946a51722d23565bdd561 Mon Sep 17 00:00:00 2001
From: Jomar Milan
Date: Wed, 22 Mar 2023 03:20:59 -0700
Subject: Handle newlines in cIniFile (#5447)
* Handle newlines during read and write in cIniFile
When reading the ini file, replace \n with newline. When writing,
replace the newline with \n.
* Use ReplaceString instead of regex in IniFile
* Update cIniFile description
* Removed duplicate variable
* Revert "Removed duplicate variable"
This reverts commit de11bac047d871dfbffec28b72f72a2935bd339e.
* Removed duplicate variable
Now without plugin changes
---------
Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com>
---
Server/Plugins/APIDump/APIDesc.lua | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'Server/Plugins')
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua
index a5f967915..955978670 100644
--- a/Server/Plugins/APIDump/APIDesc.lua
+++ b/Server/Plugins/APIDump/APIDesc.lua
@@ -5375,6 +5375,10 @@ ValueName0=SomeOtherValue
insert values by hand. Then you can store the object's contents to a disk file using WriteFile(), or
just forget everything by destroying the object. Note that the file operations are quite slow.
+ Cuberite will write the characters '\n' in place of line breaks in the values of the cIniFile when
+ it is being stored into a file. It will also replace '\n' with line breaks when it reads an INI
+ file.
+
For storing high-volume low-latency data, use the {{sqlite3}} class. For storing
hierarchically-structured data, use the XML format, using the LuaExpat parser in the {{lxp}} class.
]],
--
cgit v1.2.3