summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2016-02-24HPM Hooks UpdateHercules.ws1-0/+2
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2016-02-24Modified RBUFP to return a const void *Haru1-1/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Modified the WBUF family of macros to ensure a non-const buffer is usedHaru1-1/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Changed RFIFO2PTR (and P2PTR) to return const void*Haru1-2/+2
- Also increased robustness of the macro Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Changed RFIFOP and WFIFOP to return const void * and void * respectivelyHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Implemented aStrndup()Haru2-0/+65
- aStrndup() behaves similarly to the POSIX function strdup(). It allocates sufficient memory for a copy of the passed string, copies it, and returns a pointer to the copy. A maximum number of characters is copied (and a NUL terminator is always appended after the end). Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added const qualifier to the {RFIFO,RBUF}{B,W,L,Q} familiesHaru1-9/+9
A read FIFO/buffer should be, well, read-only. Signed-off-by: Haru <haru@dotalux.com>
2016-02-20Fixed some warnings in GCC 5.2Haru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-02-20Fixed compile warnings in clangHaru1-1/+1
- Fixed a -Wshorten-64-to-32 warning in case there's no thread-local-storage available - Disabled -Wcast-align for the time being Signed-off-by: Haru <haru@dotalux.com>
2016-02-20Added explicit c99 mode to CFLAGS in the configure scriptHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas6-24/+24
Add all missing -Wformat flags into configure.
2016-02-19Fix some cast discards 'const' qualifier from pointer target type warnings.Andrei Karas2-8/+8
Add -Wcast-qual into configure comment.
2016-02-17Replaced some now unnecessary includes with forward declarations in header filesHaru5-5/+8
Added some forgotten <stdio.h> and "common/conf.h" includes to .c files, that were previously masked by the above. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru7-117/+120
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru4-10/+12
- 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 typesHaru2-0/+261
- 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.5Haru2-6/+6
- 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>
2016-02-15Fixed a missing include in utils.hHaru1-0/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-02-07Fix blind defined macro WFIFO2PTRhemagx1-1/+1
Follow up b77735473db348a65b749a79549852713f142dc1
2016-02-06Merge pull request #1142 from 4144/pluginsfixHaru1-1/+4
Fix memory corruption if plugin add command line parameter without he…
2016-02-06Fix memory corruption if plugin add command line parameter without ↵Andrei Karas1-1/+4
help/description.
2016-02-05Clear timer function after auto remove timer ended.Andrei Karas1-0/+1
2016-02-05Add missing checks into timer.cAndrei Karas1-5/+58
2016-02-05Add to system information also information about clock function.Andrei Karas3-0/+17
I think issues with stuck skills delay/cooldown related to timers/clock. This change allow to see with what clock functions issue can be reproduced.
2016-02-05Merge pull request #993 from HerculesWS/mobdb2sqlAndrei Karas2-0/+46
Mob DB support for the db2sql plugin
2016-01-31Move P2PTR Macro to socket header and split the macro into two macros for ↵hemagx2-0/+10
WFIFO/RFIFO. Change packet database enums to defines in mmo.h
2016-01-29Merge pull request #1108 from 4144/pcreconfigureHaru1-1/+1
Enable pcre by default in configure and show error if pcre missing.
2016-01-29Merge pull request #1100 from theultramage/gpermHaru1-1/+2
more meaningful names for fields of enum guild_permission
2016-01-29Added apply_percentrate and apply_percentrate64 functionsHaru2-0/+46
Signed-off-by: Haru <haru@dotalux.com>
2016-01-25Fix packet id being sent encrypted to Hercules Plugin Manager.hemagx2-3/+3
Now packet id will be passed to Hercules Plugin Manager instead of let it figure it on itself
2016-01-21Enable pcre by default in configure and show error if pcre missing.Andrei Karas1-1/+1
2016-01-14Adjusted names in enum guild_permission to still make sense when additional ↵ultramage1-1/+2
custom permissions are added.
2016-01-12Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-12Replaced 22-bit mask entry with a regular uint32 in the noviewid mapflag ↵Haru1-0/+1
implementation As per ultramage's suggestion in #926 Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Sanitized various macrosHaru8-26/+26
Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Corrected various zero-argument function definitionsHaru2-8/+8
- Functions should always specify their arguments, even if they take none. In C, not specifying arguments is different than specifying (void). Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Added support for MC_CARTDECORATE skill.Jedzkie1-5/+11
*This skill is supported only by 2015-08-05aRagexeRE clients onwards.* Closes #1025 as merged Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Added Support for BodyStyleDastgir1-1/+1
Closes #974 as merged
2016-01-03HPM Hooks UpdateHercules.ws1-0/+1
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2016-01-03HPM Hooks UpdateHercules.ws2-2/+2
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2015-12-28Added elemental_id enum, replaced numeric elemental IDs with enum membersHaru1-3/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added merc_id, replaced numeric mercenary IDs with enum membersHaru1-1/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added homun_id enum, replaced numeric constants with enum membersHaru1-3/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-12-22Add a source constant SCRIPT_VARNAME_LENGTHAnnieRuru1-0/+2
since we can freely adjust the length of the variable name just edit this value and edit in main.sql
2015-12-17Merge pull request #917 from dastgir/packetAndrei Karas1-1/+5
Update max packet size according to client date
2015-12-17Update max packet size according to client dateDastgir1-1/+5
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru54-189/+1097
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL information on interactive server startupHaru2-0/+12
2015-12-13- Fixed #723 now it's possible to retrieve Battle Config Settings from ↵Your Name3-12/+48
plugins into scripts - Fixed Possible Crash when null parse function pointer passed to HPMi->addConf - Now it's possible to use same parse function for all config entries - Now Battle Config entries must have a return function
2015-12-12HPM Hooks UpdateHercules.ws1-0/+12
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>