summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2016-07-07Dont show compilation warnings about root if building for ci.Andrei Karas1-0/+6
And allow run under root in ci.
2016-07-04Added messages to discourage running Hercules as root.Haru1-4/+61
- You should not run Hercules as root, period. - If you understand all of the security implications, and still want to do so (and you don't want to be bothered by the warning messages), open core.c and uncomment the line: "//#define I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT" - If you're running Hercules as root because your provider forces (or encourages) you to do so, it means they're really doing it wrong, so please complain to them and ask them for an alternative. - More info on the topic: http://www.tldp.org/HOWTO/Security-HOWTO/local-security.html https://wiki.debian.org/sudo http://wiki.centos.org/TipsAndTricks/BecomingRoot http://fedoraproject.org/wiki/Configuring_Sudo https://help.ubuntu.com/community/RootSudo http://www.freebsdwiki.net/index.php/Root Signed-off-by: Haru <haru@dotalux.com>
2016-07-03Replace all warnings to errors if build bot configure option enabled.Andrei Karas1-0/+4
2016-07-03Add into travis configure option --enable-buildbot.Andrei Karas1-0/+2
Also disable all known default warnings if build bot option enabled.
2016-07-02HPM Hooks UpdateHercules.ws2-0/+4
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2016-07-02Trivialities: indentation fixesHaru2-9/+9
Signed-off-by: Haru <haru@dotalux.com>
2016-06-30Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.Andrei Karas1-0/+5
2016-06-30Add #ifndef for different constants in mmo.hAndrei Karas1-0/+68
2016-06-25Correctly escaped special characters in the generated_translations.potHaru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25HPM Hooks UpdateHaru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Implemented VECTOR_TRUNCATEHaru1-0/+10
- Clears a VECTOR, without freeing its data (truncates length, preserving capacity) Signed-off-by: Haru <haru@dotalux.com>
2016-05-14Removed dead leftover code from some testing a while ago.Matheus Macabu1-18/+0
2016-05-08Removed some legacy checks for MSVC <= 2003Haru3-11/+7
Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Removed 'temporary fix for bugreport:4961', no longer necessaryHaru1-10/+0
- The provided test cases return success on all currently supported FreeBSD versions (9 and 10) - Fixes #1283
2016-05-08Removed some old Subversion <=1.6 support codeHaru1-34/+0
Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Removed some old MySQL 4 compatibility codeHaru1-15/+0
Long overdue, since MySQL 4.x was already unsupported for quite a while (to be fair, we're about to deprecate support for MySQL 5.0 and 5.1) Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Fixed various issues pointed out by cppcheckHaru4-13/+10
Signed-off-by: Haru <haru@dotalux.com>
2016-05-01Merge pull request #1253 from HerculesWS/hpmhookingAndrei Karas5-38/+38
Hpmhooking improvements
2016-05-01Fix one issue found by gcc 6 with -O3.Andrei Karas1-0/+1
2016-04-30HPM Hooks UpdateHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Moved HPMHooking-related definitions to plugins/HPMHooking.hHaru4-37/+37
- Plugins that want to make use of the HPMHooking must now include "plugins/HPMHooking.h". Signed-off-by: Haru <haru@dotalux.com>
2016-04-27Add checks for wrong timer id. Some times in code it can be 0 and not -1.Andrei Karas1-2/+8
Now tid is illegal, and tid start counting from 1.
2016-04-25HPM Hooks UpdateHercules.ws1-0/+1
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2016-04-23HPM Hooks UpdateHaru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16HPM Hooks UpdateHaru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16HPM Hooks UpdateHaru1-0/+19
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16HPM Hooks UpdateHaru2-0/+12
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Rewrite client interface for login server (part 1)hemagx1-6/+1
Rewritten incoming/outgoing packet handlers to use structs instead of manipulating the WFIFO buffer bytes directly Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Added const qualifier to the input parameter of bin2hexHaru2-6/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-04-16Updated GNU Make build system to support private headersHaru1-14/+17
Signed-off-by: Haru <haru@dotalux.com>
2016-04-05Disabled some #pragma GCC diagnostic on versions that don't support themHaru2-3/+18
- Fixes compilation on gcc 4.4 for the brave ones who still want to use it (we recommend gcc 4.7 or newer) - Removes some warnings about unknown pragmas on MSVC Signed-off-by: Haru <haru@dotalux.com>
2016-04-04Merge pull request #1210 from HerculesWS/wcast_qualAndrei Karas11-629/+672
Added -Wcast-qual compiler flag
2016-03-21Update Max Zeny to official value 2,147,483,647hemagx1-1/+1
closes #1213
2016-03-20Added separate char* and const char* data types to union DBKeyHaru2-9/+12
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped the remaining (private) typedef in db.cHaru1-62/+62
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBMapHaru5-154/+161
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru3-45/+49
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru2-154/+154
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed typedefs from db-related enumsHaru2-154/+167
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Changed buffer argument of SQL->StmtBindParam() to constHaru2-6/+15
Parameters are supposed to be read-only Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru5-100/+107
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to some typecastsHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-03-09Corrected some issues in the item data saving functionHaru1-0/+4
- Unique ID could get duplicated (resulting in an apparent item duplication, while it's only unique ID corruption). Fixes #1191 - Removed duplicated code (char_inventory_to_sql, being an almost exact clone of char_memitemdata_to_sql) Signed-off-by: Haru <haru@dotalux.com>
2016-03-06Check allowed range for "View" field in item_db for weapon items.Andrei Karas1-1/+2
Also fix some array sizes.
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Corrected wrong variable type of struct status_change_data::tickHaru1-4/+6
- The variable should be signed, since it uses the value -1 to indicate infinite duration (and it's stored as signed in the database). - Added #define for the special value -1 (INFINITE_DURATION). - This fixes an issue causing status changes to fail being saved to database (thanks to Michi for reporting it). - Related to commit 8dc75721. Signed-off-by: Haru <haru@dotalux.com>
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>