summaryrefslogtreecommitdiffstats
path: root/src/IniFile.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-16Removed all Printf-family functions from StringUtils.Mattes D1-15/+10
Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments. Also fixed code-style violations already present in the code.
2023-03-22Handle newlines in cIniFile (#5447)Jomar Milan1-1/+5
* 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>
2020-05-15Enable some more clang-tidy linter checks (#4738)peterbell101-1/+1
* Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
2020-05-07Remove old Android leftovers (#4722)Mat1-4/+4
2018-05-06Use clang-tidy to check more code conventions (#4214)Bond-0091-68/+68
* Create clang-tidy.sh * Add clang-tidy to circle.yml * Fixed some naming violations Fixes #4164
2016-04-14Revert "Issue3136"LogicParrot1-0/+3
2016-04-12Fixed port override code.Alexander Harkness1-3/+0
2016-02-05Bulk clearing of whitespaceLogicParrot1-3/+3
2016-02-05Ignore trailing and leading spaces in INI values# Please enter the commit message for your changes. Lines startingLogicParrot1-4/+4
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-46/+46
2015-05-24Made -Weverything an error.tycho1-1/+1
2015-05-19Make -Werror disabling file onlytycho1-1/+1
Ad fix a load of warnings
2015-05-18Add support for setting ports through command linetycho1-1/+12
2015-05-16Initial implementation of IniFile overloadingtycho1-10/+41
2015-05-09More style checking.Mattes D1-2/+2
Spaces around some operators are checked.
2015-01-27IniFile: Added common code to migrate ports.Mattes D1-0/+36
Old settings have IPv4 and IPv6 ports as separate values, new settings have a single value for the ports.
2014-10-27CheckBasicStyle'dAlexander Harkness1-3/+3
2014-10-24IniFile: Removed the problematic printf-like Set function.Mattes D1-14/+0
It wasn't used in any client code anyway.
2014-10-23IniFile: Removed an unused macro.Mattes D1-4/+0
2014-10-23Merged IniFile into main MCS sources.Mattes D1-1/+1
2014-09-03Added cIniFile::HasValue() function.madmaxoft1-0/+18
2014-07-21SuggestionsTiger Wang1-1/+1
2014-06-10Portal improvements and suggestionsTiger Wang1-0/+4
2014-06-07Capitalisingworktycho1-1/+1
2014-06-07Fix reading 64 bit valuesworktycho1-2/+5
2014-06-05SuggestionsTiger Wang1-0/+20
2014-05-09Fixed MSVC 64-bit build warnings.Mattes D1-3/+3
2014-05-08Fixed MSVC 64-bit build warnings.Mattes D1-3/+3
2014-04-17Added new AI rulesTiger Wang1-2/+3
+ Added new AI rules handling cacti and large heights * Fixed cIniFile not recognising comments in cIniFile::ReadFile() * Fixed users.ini not being properly generated * Changed all instances of (int)floor(GetPosXXX()) to POSXXX_TOINT
2014-02-17Fixed comment typonarroo1-1/+1
2014-02-17Fixed Comment Typo.narroo1-1/+1
2014-02-17Fixed the tab spacing.narroo1-22/+22
2014-02-17Fixed Tab spacing of cases.narroo1-10/+10
2014-02-16Reworked RemoveBom to use unsigned chars and reverted the logic changes in WriteFile. Should work fine now.narroo1-82/+96
2014-02-16Changed unsigned char[] back to char[].narroo1-1/+1
2014-02-16Changed char[] to unsigned char[] in cIniFile::RemoveBomnarroo1-1/+1
2014-02-16Addressed Issue #402. cIniFile can now process UTF-8 files that have anarroo1-67/+89
Byte Order Marker, BOM.
2014-01-16Another VarArgs fix.madmaxoft1-4/+2
This time using va_copy() on platforms that have it and simple assignment on platforms that don't.
2014-01-15Using a 2nd argument instead of va_copy().madmaxoft1-2/+4
This seems to be the only reasonable C++03-only solution.
2014-01-11Fixed reading the files.madmaxoft1-1/+1
Duplicate values were ignored.
2014-01-11IniFile: Split SetValue() into AddValue() and SetValue().madmaxoft1-28/+55
Each function does what one would assume - AddValue adds a new value, SetValue overwrites existing value (creates a new one if not exists, if instructed to do so).
2014-01-10Fixed cIniFile's SetValue().madmaxoft1-9/+1
How did we not see this earlier? Each call to SetValue would actually ADD a value!
2013-11-24Moved iniFileAlexander Harkness1-0/+0
2013-10-25cIniFile: Renamed functions to make meaning more explicit.madmaxoft1-100/+102
For example KeyComment() -> GetKeyComment() / AddKeyComment()
2013-10-25cIniFile doesn't store filename internally anymore.madmaxoft1-8/+7
2013-08-05cIniFile now reads .example.ini if not requested not to.madmaxoft1-279/+450
As specified in #44, when the .ini file cannot be opened, a .example.ini is tried, and if it succeeds, it is written as .ini. This makes it easy to provide ini file templates.
2012-09-08Added the ItemToString() and ItemTypeToString() functions.madmaxoft@gmail.com1-59/+88
Ref.: http://forum.mc-server.org/showthread.php?tid=434&pid=4506#pid4506 git-svn-id: http://mc-server.googlecode.com/svn/trunk@847 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-16MCServer should run just fine on Android now :Dfaketruth1-2/+2
The server is also stoppable from Android git-svn-id: http://mc-server.googlecode.com/svn/trunk@743 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-606/+606
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09Removed an unneeded includemadmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@589 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-09New IniFile functionality: read value and set default if it isn't present (GetValueSet() ); used by cWorldmadmaxoft@gmail.com1-24/+36
git-svn-id: http://mc-server.googlecode.com/svn/trunk@586 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-04strstream is deprecated, using sstream insteadcedeel@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@554 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-21/+100
git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Plugins can now be enabled and disabled through WebAdminfaketruth1-7/+15
WebPlugins can now have spaces in their tab names git-svn-id: http://mc-server.googlecode.com/svn/trunk@204 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-1/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03Source for additional projectsfaketruth1-0/+507
-jsoncpp -lua -tolua++ -WebServer -zlib -iniFile git-svn-id: http://mc-server.googlecode.com/svn/trunk@4 0a769ca7-a7f5-676a-18bf-c427514a06d6