summaryrefslogtreecommitdiff
path: root/src/common/conf.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-13Update copyright headers for year 2020Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2019-10-05Dehardcodes db files base path so the db folder can be easily movedGuilherme Menaldo1-0/+30
2018-07-01Change functions to static where possible (Part 1 - common)Haru1-22/+22
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2016-11-19Add fixed-size versions of the _int64 libconfig getters/settersHaru1-6/+80
As we use int64 (instead of long long int) through the code, it's preferable if our libconfig interface does the same, avoiding us to create temporary interchange variables for that purpose. Signed-off-by: Haru <haru@dotalux.com>
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-08-20Added a better error message when a libconfig file is not foundHaru1-0/+5
Previously, it'd say "[Error] (null):0 - file I/O error" Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru1-26/+29
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-7/+9
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Added new set of functions to libconfig in order to handle other data typesHaru1-0/+249
- New data types supported: - uint16 - int16 - uint32 - bool - mutable string - Documented conf_read_file Ported to modern Hercules and cleaned up from Panikon's commits fa09661f1bdbe41060fa97f5e63810523feadcc0, cbb3e3b6ad987eeeaac0c75236feabfd2206cf07, cd79c70101638cff476c40d31e2b7cd031915284, 126f9b2dc1ab5af223ef37be6000346fe18a0a96, b9bf380edc30dab038abef41568081037a75ffb5. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Updated libconfig to version 1.5Haru1-3/+3
- Based on https://github.com/hyperrealm/libconfig/releases/tag/v1.5 f9f23d7a95608936ea7d839731dbd56f1667b7ed - Improvements that come with this libconfig version: * Don't fclose() a null pointer. * check if file being opened is a directory * added config_set_options(), config_get_options(), setOptions(), getOptions(). * renamed config_setting_lookup_from() to config_setting_lookup() and documented it * floating point precision loss patch * scanner code cleanup * parser code cleanup * bugfix; capture root filename - Parser generated with Bison 2.7 - Scanner generated with flex 2.6 - This includes the windows-compatibility commit 909b06c07e30e456cc63f58d31b0e2f3aad4cc43 from upstream (although not part of version 1.5) Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-1/+1
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-2/+2
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-6/+5
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-11-11Corrected some uninitialized interface functionsHaru1-0/+1
- Detected through the just merged validation tool, special thanks to Andrei Karas. - Added validation tool to the Travis tests. Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-0/+3
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-3/+0
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-0/+3
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
2014-01-18Libconfig Interfacedshennetsind1-42/+116
Ready for plugin use. Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-11-29Follow up 3a269dca93c421141631b4c87b2f366b6c130a42shennetsind1-0/+3
Extended to the fix to aggregated as well, as in val: [ y,x ]/{y,x}/(x,y,...) Signed-off-by: shennetsind <ind@henn.et>
2013-11-28Fixed conf inheritance issueshennetsind1-5/+9
Special Thanks to bgamez23, kyeme. Signed-off-by: shennetsind <ind@henn.et>
2013-07-29Permission cache overhaulPiotr Hałaczkiewicz1-1/+1
* Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-73/+74
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-74/+73
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-22Major cleanup all over the place, made possible by mkbu95's scan-build ↵shennetsind1-3/+3
report he provided us with. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16687 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-20- Fixed CMake compilation (libconfig integrated into common_base).flaviojs1-1/+1
- Chanced libconfig.h include directives to double-quoted form (never use the system version of libconfig.h). - Removed ShowError/ShowNotice from sig plugin (showmsg.c depends on core.c). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15737 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 - Added `libconfig` (configuration file library: ↵gepard19841-0/+109
http://www.hyperrealm.com/libconfig/): - Updated VS9/10 project files. - Updated `configure` & `Makefile`s. - New GM, Commands & Permissions system: - '''This is a backwards compatibility breaking update''', please read tid:58877 - Replaced GM levels with Player Groups. - Commands permissions & other privileges now depend on group, not GM level. - `@help` command improvements: requires "commandname" param and shows more detailed info about commands. - Modified GM whisper system to deliver messages basing on permissions, not GM level. - Remote trade request is now possible only if player is allowed to use `@trade` command as well. - Added a proper permission to use `/changemaptype` command. - `clif_displaymessage` is now capable of displaying multiline messages. - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster). - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server. - Merged `@monster`, `@monsterbig` and `@monstersmall`. - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players. - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`). - Fixed `atcommand` script function reading unknown memory area (possible access violation). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec